Audio keeps playing for a second after pausing when using JACK audio

What is your operating system?
Debian GNU/Linux bookworm/sid x86_64

What is your Shotcut version (see Help > About Shotcut)? Is it 32-bit?

Can you repeat the problem? If so, what are the steps?
When the “Use JACK Audio” setting is enabled, Shotcut will keep playing audio and stutter for a second after pausing playback. There’s no lag or anything when starting playback. This also doesn’t affect video playback or the play head movement. Video playback and the play head stop right away.

This is what I see in the logs:

[Debug  ] <MLT> on_jack_start
[Debug  ] <MLT> on_jack_stop
[Debug  ] <MLT> [filter jack] on_jack_seek: 20472

A demonstration of the bug is attached. Pay attention to the play button to see what’s going on.