It's such an issue that Dell created a new form factor for laptop RAM that was mostly designed to reduce the distance between the RAM and the CPU, as well as improving signal integrity a bit.
PCI switched from parallel to multiple serial lanes with PCIe, because it was getting to the point where handling 32 parallel data lines with a single clock over a few centimetres was a problem, even for the top dedicated GPU slot (AGP). CPU's can't switch to multiple serial lanes for RAM though, they have to have extremely tight timing and carefully laid out connectivity. DDR5 actually incorporates two separate RAM channels on a single module to help alleviate that, like you used to do manually back in the day by having two physical sticks.
That's also why you can get 48GB DDR5 sticks. They are actually a 32GB and 16GB module on a single stick, and each module must be a power of 2 size.
Anyway, simply soldering the RAM chips down as close as possible to the CPU is always going to be better for very high speed parallel signals than a socket. How much difference it makes depends on how important RAM timings are to your CPU and iGPU.