ويسألونك عن المحيض قل هو أذى فاعتزلوا النساء في المحيض ولا تقربوهن حتى يطهرن
They ask you about menstruation; say that it is a state of harm, so abstain from intercourse with women during menstruation until they become pure.
The prohibition concerns sexual intercourse during menstruation. Marital intimacy is a lawful category in its proper circumstances, but this particular circumstance makes intercourse forbidden.
The conduct ruling is unambiguous: the prohibited act must not be committed. Whether some legal consequences nevertheless arise from the occurrence is a different issue.