Script camera.record never stops

I have been using camera.record script for years. However, recently (since a couple months ago I guess) it never stops recording on my setup. Here is a little script I wrote to test it:

alias: Test Camera Recording
sequence:
  - action: camera.record
    target:
      entity_id: camera.frontyard
    data:
      filename: /cctv/frontyard/{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4

On the first run after homeassistant started. It shows the following on the Trace Timeline of Traces:

A folder is created as frontyard but it is empty.
On sequential run it fails with the following message on Trace Timeline of Traces:
Stopped because only a single execution is allowed at September 2, 2024 at 1:18:01 PM (runtime: 0.00 seconds)

Environment:
Core version: 2024.8.3
Frontend: 20240809.0
Installed as: docker container
Host OS:

$ uname -a
Linux nuc13 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

snip of the configuration.yaml:

default_config:
homeassistant:
  allowlist_external_dirs:
    - "/cctv"

The camera.frontyard entity is a rtsp stream feed from frigate running on another docker container on the same host.