TransformStream API doesn't close immediatley

For Workers & Pages, what is the name of the domain?

https://extl.com/

What is the issue or error you’re encountering

I have a Cloudflare worker that I use to stream mp3 files from Cloudflare cache with handling range headers, it works fine at the beginning, but when it reaches end of mp3 file, a loop of requests keeps going and never stops until it fails, it also happens if the user went directly to the end of the mp3 file. I use TransformStream API for that.

What are the steps to reproduce the issue?

On frontend I have an audio player, so I just play the end of the mp3 file, then the continuous requests will start to be called.
If I remove TransformStream API implementation and just serve the mp3 file from the origin, it works fine.
I have a feeling that it’s a browser behavior, but why it happens with TransformStream API implementation.

I’m using TransformStream API to stream ranged content from the cache for performance and memory reasons.