You can't stop competition, you can only reduce the amount of -OH present. The usual strategy is to use a minimum amount of water - so using conc. aqueous ammonia in an alcoholic solvent, or even using ammonia in an anhydrous solvent by saturating the solvent of choice with gaseous ammonia (anhydrous ammonia solutions are also commercially available).
Unless you are operating at very high pH, ammonia will normally outcompete hydroxide anyway. Consider conc. ammonia and the relative pKas of ammonium and water - there is far more ammonia present than hydroxide. I've adapted a few literature preparations that originally called for gaseous or anhydrous ammonia by using conc. aqueous ammonia instead and they worked perfectly well.