The best way to ensure this would be to run 2 studies of the same size that point to the same study URL. First create your basic study with all the details and then "duplicate" it via the actions menu. On one of these studies you should add a male only prescreening, on the other a female only.
You can link these two Prolific studies to the same survey URL and use the same completion URL to return participants to Prolific.
You can do the above for any demographic where you want an even split.