The phosphoregulation of proteins with multiple phosphorylation sites is governed by biochemical reaction networks that can exhibit multistable behavior. However, the behavior of such networks is typically studied in a single reaction volume, while cells are spatially organized into compartments that can exchange proteins. In this work, we use stochastic simulations to study the impact of compartmentalization on a two-site phosphorylation network. We characterize steady states and fluctuation-driven transitions between them as a function of the rate of protein exchange between two compartments. Surprisingly, the average time spent in a state before stochastically switching to another depends nonmonotonically on the protein exchange rate, with the most frequent switching occurring at intermediate exchange rates. At sufficiently small exchange rates, the state of the system and mean switching time are controlled largely by fluctuations in the balance of enzymes in each compartment. This leads to negatively correlated states in the compartments. For large exchange rates, the two compartments behave as a single effective compartment. However, when the compartmental volumes are unequal, the behavior differs from a single compartment with the same total volume. These results demonstrate that exchange of proteins between distinct compartments can regulate the emergent behavior of a common signaling motif.