The Holyrood clash came as gender critical campaigners wrote to health chief Neil Gray demanding action over changing room policies.