I am little bit confused by your question. Flying a certain heights (e.g. fixed height above ground) is based on the flight plan that you make; it is not a ability of the drone itself.
I recently came across UgCS mission planner software: https://www.ugcs.com/ . This software allows to implement a custom DEM for flight planning in terrain following mode (so also for example a DEM that resulted from a previous survey to really have accuracies up to dm). You can also indicate no go zones, and plan larger areas in one single flight plan, letting the drone resume at a certain waypoint when you changed batteries. It is compatible with most commercial drones that are on the market: https://www.ugcs.com/supported_drones_autopilots
I haven't tried it myself, but I saw a demo and it looks very promising...!
It is indeed the software that matters, but both drone and software are often considered together I believe, especially in commercial UAS. I will look into the details of your suggestions Hanne Hendrickx and Narges Kariminejad
Thanks. Suggestions of active sensing of topography to keep flying at constant elevations seems too tricky if you ask me, imaging flying over very complex terrain with some wind (and unstable UAV) like Swiss Alps. If you come across recent papers using your suggestion, do share. Cheers, Amaury
Two prior answers are correct, it is the mission planning software that has direct access to the map DTM and can direct the drone to fly way points at reference heights above the DTM values. UGCS is the best solution for that and is compatible with many Drone Flight controllers including DJI