Sounds like you have a cross flow somewhere. Do you have a washing machine “Y” mixer hose? Is there hot and cold water at the outside hose bibb? Turning on both hot and cold at the spigot and having a nozzle turned off at the end of the hose can cause a cross flow. Sometimes shower valves can malfunction. Do you have a hot water recirculation pump?