Have you enabled this in the "Advanced Settings" menu in the "Visual Navigation Settings"? Even if you enable Obstacle avoidance in the first menu, you have to go to the advanced settings lower down to enable "RTH Obstacle Check" for RTH. It says that it will automatically enable it if you switch on obstacle avoidance, but I still had to enable it in the advanced settings.
The only time I get a warning that obstacle avoidance is switched off is in the last stages of landing, i.e. 1m or so off the ground and just before it lands.