Hello: Lets make sure we’re discussing the same thing. You said you put a new diverter valve in the shower. To me that valve only switches from tub to shower. If you have a thermostatic or pressure balanced shower valve (the valve that actually mixes hot and cold to get to the right temperature) it probably is not working correctly and you need to talk to the manufacturer.
If the shower valve is what you replaced, the new one is defective.
There may be other info I don’t have that would make me give you a different answer, but right now it sounds like only the shower valve could be at fault. In these valves, parts can be assembled incorrectly, or debris can mess things up. A cylinderical shuttle or spool that some pressure balanced valves have can be installed backwards, causing grief 😕 and short showers!