Xorg-server not calling SetType after TakeControl, leaving the session Type as is.
Relevant file: https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xfree86/os-support/linux/systemd-logind.c
During the logind integration, Xorg becomes the session controller but does not set the type, it remains as is for the entire duration of the session and since Xorg is the session controller it cannot be changed, because SetType can only be done by the session controller.
This results in the session being always treated as a console session during Xorg's execution, if that was the type prior to Xorg startup.
This issue is hidden by Display Managers because they set XDG_SESSION_TYPE prior to the session existence, setting the Type to x11 by default, it can only be noticed by launching Xorg from a console session in a login shell in the way of startx or similars.
The solution is to SetType to x11 after TakeControl is done, identifying the session as a graphical session (of type x11) for the entire duration of Xorg's execution.
Attached patch that implements the solution, as an example of what I mean. SetType.patch