Generally speaking, that sort of disconnect is tied to fatigue (or, less likely, a virus). How far apart were the races? How was your recovery? How was your HRV trending coming into the second event? How has it been since?
Wrt heat, it can have a dramatic effect, depending on how heat acclimated you were before the race. Numbers vary, but can cause dramatic increase in PE at lower HR.