To be more technical:
The "beyond a reasonable doubt" standard requires that the "facts of the case" be proven beyond a reasonable doubt - every one of them individually, with a list of facts to prove being given in the jury instructions and depending on the crime and jurisdiction For example, in a murder case, basic facts can be "The victim is dead" and "The defendant deliberately killed them". Beyond that, the prosecution "bears the burden" of demonstrating these facts as undeniably true. For more about what the legal burden is, there's details here.
The same does not hold true to what are called "affirmative defenses" or "defense theories". For example, if you charge me with assault and say I hit you with a chair, and I say that I was trying to stop you because you were trying to rape me, you don't face a "beyond a reasonable doubt" standard and 100% of the burden to prove that you weren't trying to rape me. Depending on the circumstances, there's either a "shared burden" or I would bear the burden of proof on my own. If the defense is to be analyzed on its own, as it's not a "basic fact", but rather a "defense theory", it would not on its own face a "reasonable doubt" standard (generally a "preponderance of the evidence" or "clear and convincing evidence" - although the claim may shift the jury's views toward whether there's reasonable doubt toward the basic facts in other ways.
There are many different types of defense theories, too numerous to go into here. And in most crimes, claims of consent are treated as defense theories - they don't on their own need to be proven beyond a reasonable doubt (they contribute to doubt relating to the basic facts but are not themselves a specific fact for jury evaluation), and there's either a shared or shifted defense burden. If you say "Hey, I wasn't robbing her, she gave me the money because she wanted to help me out", the burden doesn't fall 100% on me to prove that beyond a reasonable doubt that I didn't - it's your theory, you have to bear part of the burden of proof for it. The case as a whole still needs to be proven beyond a reasonable doubt, of course.
It would be nice - and in fact, would only be basic fairness - if rape cases faced the same standard. Unfortunately, in most jurisdictions, it does not work that way. Consent is not treated as a defense theory. Humans are not treated as in a perpetual state of consent for giving away money, for being taken strange places by strangers, or any of the other sorts of cases where "consent" defenses are common.... except that they generally are treated as being in a perpetual state of consent for sex. No matter how weird, twisted, sick the sexual practice, with whatever person they may be, even with a person not matching your sexuality, you're presumed by default to be in consent for it. And the burden falls 100% on the accuser in this one type of case to prove that consent was not given.
And this is wrong.