If a transman "passes" and has a male birth cert and has joined the practice since starting to identify publicly as male (vice versa trans women re prostate etc), then it's not really about onus on a GP to 'remember'.
^^ Yes - some notable TW celebrities have tweeted about compelling the NHS to change the sex on their health records or to celebrate that the start of treatment means that the NHS changed the record...
However, tbh, given the amount of monitoring that should be done of anyone taking exogenous hormones, I'd be startled if this never came up. I wouldn't be allowed to take HRT after a certain age (I don't, I've seen this mentioned several times) so GPs who don't know would surely have people in for medication reviews and it might well be mentioned then.