How can I avoid empty space in the taskbar in Windows?

From time to time, I have a lot of empty space in the taskbar in Windows, even though several windows hidden behind the .... Here’s an example below, where I circled in red the empty space:

Same image without marks: https://i.sstatic.net/4aIznpML.png

How can I avoid that empty space in the taskbar in Windows? I’d prefer to see more windows in the taskbar than unused space. It seem I can’t slide the vertical line at the left of the empty space.

I use Windows 11 24H2 Pro. I didn’t have that issue in Windows 10 21H2 Pro.