Society has a problem with men sexualising women and sexually assaulting them, and sadly the first justification proposed is often the clothing worn by the woman, such as skirt length. This is victim blaming and unacceptable, obviously.
However, what can actually be done in the short term to prevent sexual assaults of this nature? I think certainly one option is, yes, dress in a manner that would mitigate your sexualisability, such as wearing longer skirts. Is this fair on women? No. Is this justified in the long term? Also no, but I think it's a matter of being street smart and understanding, (as awful and as unfair as it may be), that some men do in fact want to hurt women and some do have "Well she was asking for it" ideologies, and that this isn't changing anytime soon.
Societal change of this magnitude is difficult and takes a considerable amount of time, and I'm not really sure what the right move is. But for now, while that change is taking place and we're tackling this issue, I think it's sensible and wise to try and mitigate the risk as much as you can for yourself, and look out for others and spread awareness that sexual assault and the like is not ok.