If your shower has a pressure balancing valve, it may need adjusting or replacing. This valve helps maintain a consistent water temperature even when there are changes in water pressure. Sometimes, cross connections between hot and cold water lines can cause temperature fluctuations. Ensure that there are no cross connections in your plumbing system, and if you suspect any, consult with a plumber to rectify the issue.