I can't answer the question of why it won't RTH.
However, your drone has features like out of range alarm, low power alarm.
If you acted on the alarm and hit the RTH before the drone was actually out of range, maybe you would not have lost camera connection. Furthermore, when your drone is out...