I never had this problem on macOS 13 Ventura and older versions and now this seems very annoying when using macOS 14 Sonoma.
When there are too many icons in the Menu bar, at some point they are just hidden (even though there is available space).
I noticed this issue when using MenuMeters and setting the "Vertical Bar" option in the CPU preferences (because it takes a lot of space). Initially I thought it was a bug of this application but then figured out that any new icon will not be displayed in the menu bar after a certain amount of space is already taken.
This is how my menu bar looked like in Ventura:
And now in Sonoma any icon would become automatically hidden after a certain length (regardless if there is space afterwards or not).
Users on the web suggest Bartender to mitigate this issue, however it is yet not ideal (and also it is paid software).