Welcome to the site.
Yup: I bet your microwave and water heater are connected to a priority switch. We have one.
It provides power to the priority device stealing power from the other device. It is a way to reduce current draw. Here is the switch in our coach (I've since actually mounted it as Thor didn't think it was important enough to screw to something LOL):
Called an "Automatic Energy Select Switch".
Here is a link:
https://www.intellitec.com/index.php..._select_switch
In your case I don't think the switch is bad--its your microwave. Either get it repaired or replaced. Give the microwave manufacturer a call and see if they will help you get it fixed (Is it a High Point?).