Brightness filter gets deleted after undo and redo

Here is how to reproduce:

  1. Open an existing project.
  2. Open an image or video file.
  3. Drag and drop from the source tab in the player to the timeline.
  4. Apply a brightness filter.
  5. Undo twice. (the drag-and-dropped image or video disappears from the timeline here as expected)
  6. Redo twice.

The brightness filter gets deleted.

Shotcut 25.01.25

Maybe related to this bug with the same root cause: