It happens on both taskbars. but this may be a clue. Everything was working correctly with one monitor. It was running on HDMI. I replaced that monitor with 2 monitors that are 4k and running on displayports.
When I did this, the fences worked fine. But I went to modify one fence and I noticed that after modification, it was not working right. Something about the new setup was confusing Fences. I only have one fence on one of the monitors. That is the one I changed and was recording.
On the other monitor, I have 4 fences and they are all working correctly. However, if I change any of them, they also start misbehaving. I have to restore my fences from the backups to get it to work correctly again.
Here is a screenshot of the display when I run your program