I've had the similar issue with a night flight:
Air 3S RTH is set at 50m. Yet, aircraft would climbs to 500m if I did not stop it.
All firmware undated.
Here's what DJI responded:
Due to the ambient light being too strong or too weak, the aircraft mistakenly thinks there is an obstacle ahead, triggering the return to avoid the obstacle and increasing the altitude. When you fly at night, the ambient light is very weak, causing the aircraft to mistakenly think there is an obstacle and continue to rise. If you confirm that there are no obstacles on the return path, you can try to turn off the obstacle avoidance function and try again.