HIDIdleTime is not being reset under Screen Sharing

I am monitoring the IOHIDSystem dictionary in ioreg looking at the HIDIdleTime value. On most of my test platforms it is working as I expected - i.e. increments when there is no mouse or keyboard activity and resets to 0 when activity is detected.

I have a headless Mac Mini running macOS Catalina that is behaving unexpectedly. There is no monitor, mouse or keyboard attached to the machine and I access it over the network via Screen Sharing. The idle timer is never reset by either keystrokes or mouse movement.

When I connect a USB mouse to the machine then it begins behaving normally, resetting the timer on USB mouse actions but still ignoring Screen Sharing.

I do not see the unexpected behaviour when connecting to headless systems running Big Sur, Monterey and Ventura.

Is this a quirk in Catalina that can be overriden through a defaults setting?