GE washer GTWN4950LOWS
When set for hot wash/cold rinse, hot valve valve energizes for only a few seconds and cold comes on, resulting in a cold wash.
The issue with the water switching to cold but not coming back on would most likely be caused by a faulty temp probe that is reading the resistance wrong. The part number is WH12X10410 and at 77 degrees should have a resistance rating of 47K ohms. You would check this between the black and white wire.