Looks like this thread is about dead, but having seen this problem description while browsing the forum, the first question that pops into my head is, are you using a recirculation pump? If not, never mind, ignore the rest of this post.
If so, though my system is a Rheem, most system designs call for a check valves between the cold water feed and the start of the hot water system, and another check valve between the return feed and cold water tank intake. Those valves are to prevent hot water from entering the cold water supply line, and cold water from entering the recirc hot water return line. If the later fails, cold water can backflow into the hot water line, with the hot water valves at the end of the run receiving the cold water first. Could be a shower, a sink, whatever.
In my case, the check valve was fouled by lime scale debris from the hot water return, keeping it open, flooding my hot water return line with cold water, causing my wife to scream and curse the husband who installed "that *@*!##$ tankless hot water heater". (City water gets ice cold in Northern Idaho in the winter, too, an "electrifying" experience, so I forgive her.)
The symptoms were inconsistent, even mysterious. I'd have hot water flowing freely to the sink across from the shower putting out ice cold water, and since I installed the plumbing, I knew they were from the same 3/4" line feed, with branches in virtually the same location on that pipe. Symptoms varied by inline water pressure. Removing and cleaning the valve might work, or you might have to replace it. I've done both. Root cause, if this happens, is hard water. A water softener may fix the problem. I ultimately solved my problem by adding a water filter on the
out-take side of the hot water tank, preventing tank debris from entering the hot water line. That also protected all of my faucets and shower heads from fouling as well. I'd recommend it to every tankless hot water system as a precaution. Though I've had a few persons on this forum swear that their water is as pure as it was first created, in my personal experience, all hot water tanks everywhere produce at least some scale, and that scale enters your hot water line, fouling everything down flow from the hot water tank. (Regular hot water tanks don't seem to have that problem. The out-take hot water supply line is at the top of say, a 30 or 50 gallon conventional tank, and the sentiment sinks to the bottom of the tank.)
Hope this isn't off-topic. I've got an in depth thread somewhere on the forum documenting some of this. Feel free to me a message if this is relevant to your situation, and you have any questions. (I don't frequently scan this forum.)