See this possibly related thread about issues with hardware-accelerated decoding used by most media players but not Shotcut:
And @SteeveB is correct about colorspace conversions (RGB in test pattern generator → Y’CbCr in H.264 → decoded → RGB still image capture) may introduce slight differences not to mention using MPEG video levels (16 - 235 for Y’ and 16-240 for CbCr vs. 0-255 for RGB).