The most efficient advertising of jobs is not gender-based, it’s skill-based. Ideally you need to show your ads to candidates with exact match to job description and then some more if the pool is too small. It has nothing to do with gender.
If you cannot advertise without breaking the law, do not advertise. There are plenty of other platforms which do it right.