The 2000' horizontally from a cloud is that if the cloud is 100 feet AGL, then you can't fly under it and the closest you can get to it horizontally is 2000'.
So, stay 2000' away from a fog bank.
If a cloud is 900' AGL, you don't have to...
Why not take a more responsible approach and land before the battery reaches a critically low level?
Flying until your drone drops out of the sky is far riskier than a controlled landing, which at least ensures it reaches the ground safely.