a cheap and easy way to kill and engine ....install a fuel line shutoff valve. I place one close to the carb. I do this because I want to engine to use up all of the fuel in the bowl when not in use. Like long storage over winter months. It makes a big difference not letting fuel just sit and go bad in the carb. But it also works equally well to stop the engine too. which is exactly how I use the shutoff valve after mowing. takes about a minute of two to run until it stops. No fuel in carb to go gummy.
for a permanent fix to the kill switch, follow the brake kill switch wire...it's likely going to the a black wire that connect to the coil module spade connector. a circuit diagram might help see how the circuit functions. In my mowers (do not have brake switches, only safety switches for pto, seat, and steering arms), the kill switch wire goes from the ignition switch (off position) to each of the two coils on my v twin, and this also routes to the starter solenoid). Without getting into the technical circuitry design, basically the off position ignition key results in the coils no longer producing spark energy! Thus kill engine.
If you machine has that black wire to coil coming from a "brake switch"....this means your engine is going to stop when you turn on the brake? I think I do not understand what you mean by brake switch. But regardless, I would look for the black wire to the coil and inspect it all the way to the other things it connects with...any inline connectors...and starter solenoid. Any safety switches....the ignition switch....and of course the connector right at the coil(s). Sometimes those small gauge black "kill switch" wires get damaged and the insulation chaffs against the machine or the connector get corroded. If that happens, there is no way for the ignition switch to off to kill the coil. I would get your eyes on a circuit diagram for your machine and look at the coil kill switch circuit. It might be helpful to see where all of the switches and connectors are and where to find them. But I would visually inspect the wires all along the route. Clean it up and look carefully. often this kill switch wire is going to be very close to the flywheel and the cylinder head cooling fins...that alot of rotating mass to beat the heck out of a wire, and lots of heat from the cylinders.
Another things to understand is that a failing coil can have an internal anti cross fire diode that is failed. It's not common but it does happen. So if you have verified the black wire is good and all switches and connectors are good...and the starter solenoid and the ignition switch is good and no corrosion and no problems...then it just may be that the coil itself has failed internally. it will still produce a spark, bu the internal anti cross fire diode may have taken a dump...and that can also result in the kill switch not being able to kill the coil power! But this isn't that common. I would do the other things first before trying a new coil.
God Bless America