Why would you want to go above max permitted altitude anyway.
The ceiling you reference is relative the the take off point.
The rules, in the UK, relate to the distance to the closest ground the two ceilings are different.
For the purposes of this post imagine a hill whose top is 1240ft above the take off point, it is perfectly legal to fly up the slope of that hill to 400ft above the hill's top PROVIDING the ground is always within 400ft of the drone.
What would be illegal would be for the drone to climb vertically to 1640ft and then fly horizontally to over the hill's top. Just as it would be illegal to fly horizontally from above the hill's top to above the take off point and then descend vertically.
The drone could go no higher because of the 500m ceiling in the firmware and no higher legally because ti would be breaking the 400ft rule.