The case sensitive “S” actually is the problem, you are just expecting a readout when there is none.
Using a lowercase “s” is the same as not using it at all and the machine is reading that as a plain M412 command, so that is only giving you the status report. You have to use the capital “S” to actually change the status. When you do use the capital “S,” it does not automatically report the status change, so you then need to run a plain M412 command to check it. Your commands need to look like this:
You will see this with most other G-code commands as well; changing a parameter and requesting the status of that parameter are two separate commands with separate responses.
I just told you why: all commands MUST be capitalized. Do it EXACTLY as my previous screenshot shows and it will work.
Here is YOUR screenshot annotated for what you did wrong:
#1. Lowercase “m” is not allowed, and therefor not recognized; the machine does nothing.
#2 thru 8. Lowercase “s” is not allowed and therefore not recognized; the machine only sees the M412 by itself and reports the status of the switch.
#9. Same as #1.
#10. WE HAVE A WINNER! This command is written correctly and tells the machine to turn off the switch. The machine responds with “ok” to acknowledge that the command is recognized and implemented. It DOES NOT report the new status of the switch at this time, and this is considered normal behavior for Marlin/Snapmaker firmware. You need to then run the M412 command by itself again to get the status report so you can verify that the switch is off.