I had the same issue in my 2023 Caracal.
I had to fiddle (really technical word) with that switch and connection to get it working. One problem I had is the nut holding the switch in place was loose and when I tightened it, and adjusted the position with the moving nut (another technical word) the switch worked properly.
To make sure I had adjusted and tightened the switch properly, I turned on my video camera on the phone, put it in the locker(s), and closed the lid. I then watched the video to ensure the switch switched off the lights. I did have to adjust the moving nut a few times to get it right.
Why the switches don’t have a lock washer to ensure they stay tight seems like an oversight on Bass Cat manufacturing’s part.