The 50 gal water heater is brand new, when showering it goes hot or cold when another faucet is turned on.
That's how plumbing works. If someone uses the cold water at the faucet the shower will go hot due to the cold's volume being decreased. Likewise, if someone uses the hot water at the faucet the shower will go cold.
The ONLY remedy is to replace the entire shower valve assembly with a Mixing or Balancing or Thermostatic type valve (anti-scald). These types of valves match whatever the drop is or adjust automatically to keep a constant temperature. Weaker spray, but no shocking temperature change.