I mean Samsung DeX has done something similar, but Apple could make a much more powerful version, since they have a real fully-developed desktop and they have apps for both platforms that use a single code base.
They will, of course, never do this, because it would result in losing Mac sales. Though I think less than one would initially think, because a laptop is much handier on the go than carrying a separate display, keyboard, and mouse and the lapdocks or whatever they are called have much worse displays and keyboards.
But Apple will surely never allow such a thing since their main interest is in selling as many pieces of hardware to each of the Apple Faithful as possible. So they with a straight face suggest that a single human needs an iPad Pro (which easily tops $1500 with the eye-wateringly-expensive keyboard and a storage upgrade) and a laptop. Nevermind that they may have the same chip inside.
Something like that Samsung DEX with a real Linux OS and maybe I'm getting a new phone.
I have the latest and greatest and can attest that the experience is atrocious
Both Phosh and PlasmaMobile turn into a "proper" desktop when "docked" (Gnome-like and KDE-like, respectively).