This has been a trouble for me too.
I always make a point to bring extra batteries as well as a secondary form of navigation.
One trick I have used that works well in dense cover is to "triangulate".
To do this, I get an idea of where a location is geodetically speaking, and then I try walking towards it from about 50 paces out in a generally triangular shape.
Then even if I can't get a good reading in one spot, I can sort of figure out the location by zeroing in from three different angles.
This works better for me in tree cover than trying to stand still.
Best of luck and happy caching !