Before dealing with feminization/masculinization surgery specifically, one first has to ask whether cosmetic surgery in general is permitted. This is by no means simple and a review of sources (see e.g., here, here or here) shows a significant number of halachic authorities permitting it only in cases of real need, e.g., following an accident, to allow a person to marry, great psychological need, particularly when the surgery is risky.
Feminization surgery often requires breaking a significant portion of the face to reconstruct it, which carries real risks and much pain during recovery. The risk and unclear benefits alone might be reasons to forbid (bear in mind some people go through these operations only to regret it later.)
Beyond this, as you note, there is a Torah prohibition of "A woman shall not wear that which pertains to a man, nor shall a man put on a woman's garment" (Devarim 22:5). R J David Bleich (here) quotes R Meir Amsel (Ha-Ma'or, Kislev-Tevet 5733)
The commandment [of lo yilbash] is not limited to the wearing of apparel associated with the opposite sex but encompasses any action
uniquely identified with the opposite sex, proscribing, for example,
shaving of armpits or dyeing of hair by a male. A procedure designed
to transform sexual characteristics violates the very essence of this
prohibition.
R Avraham Steinberg (a specialist in Jewish Medical Ethics) (quoted here) writes
the biblical prohibition [...] of "wearing women's clothes" "includes conducting oneself like a person of the opposite sex" [and is] violated in converting a man to a woman.
As such feminization/masculinization surgery appears forbidden for the reasons indicated but, obviously, anyone reading this in practice should consult their rabbi
before trusting anything they learn here.
There is no more action uniquely identified with the opposite sex that to try to look like it.