That’s not banning masturbation.
That’s banning male masturbation, all forms of male and female contraception, male sex with a post-menopausal female, or male sex with a female known to be sterile for whatever reason. And of course any/all forms of male sex with another male.
It also outlaws menstruation which discharges genetic material biologically intended for embryo production.