Narratively rank is very important especially when you are trying to demonstrate a paramilitary organization in the confines of a television series. I think there are probably often arguments about this. Why is Ezri written as a counselor and an Ensign instead of a science officer of a higher rank?
I do think there is real world relevance sometimes. We see Worf and Geordi get promotions and become a larger part of the series with more screen time and character development. This works narratively to distinguish the change. An "on screen" promotion indicates some sort of character growth. We see this happen with Sisko likely because the only reason to distinguish him at first was because he was written to have a fairly minor (in universe) role which was greatly expanded.
In recent years I think rank has been downplayed as there are so many inconsistencies and patterns and anti-patterns throughout the series. It's important that you're able to tell a story where if someone is supposed to be in charge they have the appropriate rank for this. This is one of the reasons Discovery effectively promoted Tilly rapidly (all the way to being the XO for a little bit) because she was a pivotal part of the cast and needed screen time. In fact Discovery doesn't "ignore" rank it rather ignores rank conventions by having a mutineer on the bridge as a 'specialist' and a command staff that almost just takes turns at the wheel.
In Lower Decks we can assume narratively no one is going to get promoted permanently or demoted permanently because the show depends on that dynamic. If we look to Strange New Worlds we see rank downplayed to a large degree because everyone's rank is so close together. This is important to get Spock of a low enough rank so that he can be promoted to commander later. (Frustratingly there are still inconsistencies here. There seems to be confusion between Lt. and Lt. Jg. and Nurse Chapel's rank, which may be provisional because she may be a civilian contractor who has a temporary commission and then later joins with a regular commission of a lower rank - or her rank is just not important - is also out of continuity.) But importantly for SNW - narratively it makes sense to have these people of these ranks in these positions so it just works.
In a more realistic depiction people would be moving through ships much more quickly. There would be fewer officers and they would move through the ranks regularly and not stay in one position for 7 years. Likewise mostly Enlisted people would be spending a few years at most and moving onto other careers in civilian life as most people don't want to be in the military forever and if they do they become officers. Miles O'Brien (despite the insignia being weird) is probably most accurately depicted. He served on many posts, he left posts for some period of time and then returned to them in new capacities, he moved between posts. He joined in 2345 and by 2375 he was probably ready for retirement or in the case of a utopian future, moving back to Earth to teach at Starfleet until he is absolutely ancient because he's got nothing better to do and he loves his job.
I think narratively it's just a much more enjoyable to not have Odo shift shape onscreen, especially as it gives him the ability to overpower a lot of people. In the early episodes this needed to be shown so we could understand Odo's character, but by the fourth season (both when he was a solid and not) we knew enough about the Changelings that we didn't need to show this as frequently and had to figure out more creative ways to to get around Odo.