A long shot but I had the same issue and realised I had RTSS running.
After closing it I didn’t have this issue, until I ran RTSS again and loaded up a UE5 project.
It could be something RTSS is doing or another program potentially hooking in to get frame times etc