What happens if the neutral is switched rather than the hot wire for a light?
I would say are you sure the neutral wire is being switched. What you describe sounds like a common “switch leg” where the white wire carries the hot from the fixture to the switch and black takes the switched hot back to the fixture.
This was code for many years the white was supposed to be reidentified as black with paint, tape as a hot most commonly overlooked.
If the wire was actually switching the neutral so the lamp had power all the time this would be a code violation and present a hazard to someone changing the lightbulb in the future.
I would verify hot vs Neutral with a meter to make sure as we have seen diy try to reword a switch leg that was properly wired.
The white being hot all the time keeps it from being mistaken as a neutral and the reason code required this.
If they switch the neutral it is easy to fix and the colors at the light would be correct.