Have never submitted incorrect payroll information to HMRC, so can't claim any knowledge of what would happen if you did, but HMRC do change the sex marker in their records when somebody is granted a GRC.
I think that with increased ability to check data, it's more likely that this kind of discrepancy would be thrown up as 'computer says no', but I don't intend to test them.