Grey foxes are good climbers, and can climb a vertical fence. (and trees, etc.) They have reticulating claws like a cat, and can extend/retract their claws...it keeps them sharp for climbing/grabbing things, and also helps them when climbing non-porous things like fences. Having an outward facing/angled portion on the top of a fence can help keep them out...but they are also very good jumpers...so I would go with a fence at least 6' tall (solid fence they could jump onto) if you go the route of solid fence.
Electric fence is good...but I have found my chickens flew over electric fencing (I used to use a mobile coop with the tallest electric poultry fencing I could get....and it was still short enough they could fly over (not onto then over) - at least my better fliers. Especially if they had anything to 'launch off' even if it wasn't close to the fence. (i.e. think of
@BY Bob 's Aster - flew at 4' high for a very long distance...they feel more confident trying for a distance with not needing much lift....and are quite successful. Even heavier birds would try that over needing a straight up 4' height.)
Just my 2 cents.