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 nothing to do with proximity to anything.