The conversion of nitrate into N2 in low O2 regions does not consume phosphate (except in small amounts to keep the cells alive, and more if they are growing):
Nitrate in the Reef Aquarium - REEFEDITION
https://www.reef2reef.com/blog/nitrate-in-the-reef-aquarium
from it:
Deep Sand Beds
Deep sand beds can develop low oxygen regions where nitrate is used by bacteria. They use it to metabolize organics that randomly diffuse into the sand from the water column. When the oxygen gets depleted in the sand, the bacteria can still oxidize the organics available by using nitrate instead of O2. In this situation, nitrate acts as an electron acceptor (e.g., an oxygen source) in place of oxygen (O2). The end result is that nitrate is converted into N2, and the N2 blows off of the tank to the atmosphere. The reactions that take place can be complex.22 In oxygen-containing environments, the reaction looks very similar to that shown above for plankton (ignoring phosphorus here):
organic + 175 O2 → 122 CO2 + 16 NO3– + 16 H+ + 138 H2O
where organic stands for a typical organic material ((CH2O)80(CH2)42(NH3)16) that is being metabolized. In the absence of O2, and taking the nitrogen species completely to N2 (which may happen in several reaction steps), we have the following overall reaction:
organic + 124 NO3– + 124 H+ → 122 CO2 + 70 N2 + 208 H2O
It can be seen that the process above produces alkalinity (by consuming H+). In fact, it is the exact same amount of alkalinity that was depleted when the nitrate was originally formed from foods, so the net effect of the nitrogen cycle on alkalinity is zeroed out.
In many aquaria, the process takes place to an extent sufficient by itself to keep nitrate at levels below 0.5 ppm. In others, it has not been adequate. Success may depend on the size of the bed, its composition (sand type, particle size distribution, depth, and life forms in it), and the demands put on it in terms of nitrate processing. It is rarely discussed by aquarists, but organics are critical for this process as well, and some aquaria may have more or less organic matter in the water (due to use of things like skimming or granular activated carbon) and this, in turn, can impact the nitrate conversion capability of a sand bed.
This process also happens in the pores of live rock, and in a variety of other environments in a reef aquarium.