The core question is reduced and skipping the "Why do I ask this and what do I want to achieve?". Read the "Background notes" at the end, if you want to know the ugly truth...
Why LEX (Lightning Experience) is generating the markup differently for different users when it renders the very same flexipage? Sometimes it is using lots of
<slot>-elements with Shadow DOMs and sometime it is creating an old style
<div>-structure. The following screenshots were made from the very same flexipage on the same org and same app shot with different users (having the very same profile):
Is there any way on how I can control which user get which HTML-style rendered by Salesforce? If yes: how and where can I control it?
Background notes (not relevant for the core question)
I'm not using LWCs. This is a general question. The reason why I'm asking this is because I need to get the exact height of the so called "Highlights Panel" which is a standard Salesforce component available in the designer for record pages. I need the height to implement a "Sticky Header" feature for tables we are developing as aura components. We got that using aura components without Locker Service, just to determine the damn height... The height is not constant. No way to hardcode it. It depends on the scroll-position of the page (it's shrinking and growing) and if a user has selected "Comfy" or "Compact" mode, and maybe other things, too... now our code is working only if we get the HTML served in the old style without the
<slot>-elements. The reason is very clear to me: the shadow DOM is blocking my queries to determine the exact height...
And yes, I know: this is something what shouldn't be done in the first place... but still I'm curious ;-)