Military bases do not outright prohibit photography in all countries; Wayspots are allowed on bases as long as the POI meets criteria and doesn’t interfere with the military operations. Many bases in the US are like small cities, having their own parks, recreation and fitness centers, libraries, movie theaters, etc. They’re all open to all at the base, including the civilian family members that live there, and don’t interfere with base operations.
It may be different in other countries how military bases are set up, with the entire base being for operations and personnel living off-site, for example. And there certainly are different laws around the world regarding any type of recording at bases, so Wayfaring should always be done lawfully based on your location.