Platform: time doesn't start automation at the right time

I’m having problems with automations to be launched at 23:59 when the trigger is :

trigger:
  - platform: time
    at: "23:59:00"

triggers occur several minutes after the programmed time.

Out of curiosity, I replaced the trigger with:

trigger:
  - platform: time_pattern
    minutes: "59"

and added the following condition:

condition:
  - condition: time
    after: "23:00:00"
    before: "00:00:00"

in this case, automations are launched at 23:59.

This solves my problem but doesn’t explain why platform: time doesn’t launch automations at the right time.

Please don’t post the same questions in multiple places, that just leads to wasted time.

How are you running HA? HAOS on a Pi? HAOS in a VM? Container on Ubuntu?