I'm not sure this is correct in Canada.
Per our SCC:
https://www.canlii.org/en/ca/scc/doc/2014/2014scc19/2014scc19.html
"
Per McLachlin C.J. and Rothstein, Cromwell and Wagner JJ.: The
Criminal Code sets out a two-step process for analyzing consent to sexual activity. The first step is to determine whether the evidence establishes that there was no “voluntary agreement of the complainant to engage in the sexual activity in question” under s. 273.1(1) and it requires proof that the complainant did not voluntarily agree to the touching, its sexual nature,
or the identity of the partner."
See also R v Brar:
https://www.canlii.org/en/ab/abca/doc/2021/2021abca146/2021abca146.html
See also R v GC:
https://www.canlii.org/en/on/onca/doc/2010/2010onca451/2010onca451.html
"[23] More importantly, there is nothing in the language of s. 265(1)(c) or the jurisprudence to suggest that only a mistake as to the identity of the sexual partner that is induced by fraud vitiates consent. Moreover, the appellant suggests no policy reason why an identity mistake caused by something else will not do. Indeed s. 273.1 suggests the opposite. It does not confine consent to voluntary agreement except where that is negated by an identity mistake due to fraud. Where the subjective state of mind of the complainant is that her consent hinged on the identity of her sexual partner, her mistake about that identity renders his conduct non-consensual, whether or not the mistake is induced by fraud. The presence or absence of fraud may however be significant to whether the Crown can prove that the accused did not have an honest belief that the complainant was consenting.
[24] Where, as here, the complainant’s consent to sexual activity depended on it being with a particular person, her mistake about the identity of that person whether induced by fraud or not, necessarily means that subjectively she did not voluntarily agree to the sexual activity that occurred with someone else. That is precisely what the trial judge found happened in this case. "