You get the higher BAH.
Here's a quote from the NAVY OPNAV 7220.12:
b. PaYment of BAH when member resides separately from
dependents. PaYment of BAH based on dependent location for a
member who lives separately from dependents due to military
necessity may only be authorized when the member is not able to
commute daily between the duty station location and the
dependents' residence. Assigned military duties, including
deploYment and transportation interruptions, do not constitute
an inability to commute. The following duty assignments within
the 50 states and District of Columbia are determined to be
assignments to which military necessity makes it necessary for
dependents to reside at a location other than the member's duty
station:
The CO's get to decide on if "member is not able to
commute daily between the duty station location and the
dependents' residence" or not.
I am 100% sure about the Navy. Not sure about other services