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.
If it’s a thermostatic shower, it’s likely that it’s passing cold water into the hot supply which is reducing the temperature.
You likely need a new thermostatic cartridge.
If you turn off the hot supply to the bathroom with the dodgy shower and open a hot tap on the basin, do you get cold water? If you do it’s likely it’s passing through the shower cartridge to the basin.
While testing this leave the hot tap running on the basin and turn the temperature of the shower to fully hot and cold to see if this stops water. if so, shower cartridge definitely needs changing.
Reply to Shower cold/warm - hot when flush tap in the UK Plumbing Forum | Plumbing Advice area at PlumbersForums.net