The regulator intervened in the row over NHS Fife allowing trans staff to use single-sex changing facilities.