Perhaps the Rama does not rule in accordance with Rav Hai Gaon. Additionally, I would add that the Gemara in Chullin 141a applies this logic in order to give preference to performing one assei instead of another. The Gemara says that since we see that the Torah allows Hashem’s name to be erased for the sake of restoring shalom between a man and his wife, the assei of a metzora should outweigh the assei of shiluach hakan – since the performance of the metzora’s assei will constitute shalom bayis.
This Gemara indicates that the explanation of the logic behind why the Torah allowed Hashem’s name to be erased is not because the erasing is constructive; rather, it is because restoring shalom between a man and his wife is superior to other mitzvos.