OK this is complex … but I’ll try. The hot line to the shower valve comes from the tankless heater depending on flow demand. But, the cold line is a straight line feed so a pressure differential can be created between the two (cold being the higher pressure) at the shower valve. If the shower valve has a tempering device for safety it cross connects hot to cold … and the higher pressure cold pushes the hot back down the hot line until it meets equal pressure … which starves the shower valve of hot water for several seconds until the tempering closes off. The naked shower user gets a blast of cold water! According to the owners manual, if there is ANY pressure differential at all at the point of cross connect (the cross connect being the anti-scald tempering section of the shower valve), the higher pressure liquid (cold) will flow toward the lesser pressure liquid (hot). Note that this pressure differential will only occur during flow conditions; static pressures will be equal.
Nothing wrong with the water heater itself. Worse, these symptoms exist (periodic cold blast) in BOSCH installations. The owners manual says turn the water temp down (so you don't activate tempering) but that just limits the total heat meaning you get even less hot water!
Solution: Kill the tempering device. Remove flow restrictors. Lather up!