Except that being close to anything never initiates RTH.
It just doesn't happen and never happens.
Being close to obstacles might initiate obstacle avoidance or in could initiate a crash, but that's all.
Whatever the cause of your RTH was, it had...
Bigger sensors require bigger (and heavier) lenses and bigger, stronger gimbals.
Looking at the camera module on the Mavic 4, or the size of the X7 lenses, you can see that there won't be a bigger sensor.