Yes, women in menses can visit graves.
قَالَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: نَهَيْتُكُمْ عَنْ زِيَارَةِ الْقُبُورِ فَزُورُوهَا
The Messenger of Allah (peace be upon him) said, ‘I forbade you from visiting graves, now visit them.’ (Sahih Muslim 977 – 106).
In the Hadith above there is general permission to visit graves, for males and females. In order to restrict this general permission, evidence would be required. Therefore, the onus is upon anyone making the claim that women in a state of menses are not permitted to visit a grave to provide evidence. In addition, anyone claiming such a restriction would be required to provide a Nass from authoritative Fuqaha (jurists).
In the Hanafi Madhab scholars often provide a list of prohibitions for a woman in menses, visiting graves does not feature on such lists. Additionally, some scholars have explicitly mentioned that women in menses can visit graves.
وَلَا بَأْسَ لِلْحَائِضِ وَالْجُنُبِ بِزِيَارَةِ الْقُبُورِ. هَكَذَا فِي السِّرَاجِيَّةِ. (الفتاوى الهندية).
And there is no harm in a menstruating woman or a person in a state of major ritual impurity (Janabah) visiting graves. As mentioned in al-Sirajiyyah. (al-Fataawa al-Hindiyah).
It is also important to mention that some Hanafis prohibit women from visiting graves altogether. They claim that this is the position of the Hanafi Madhab. This is inaccurate, although there is a position in the Hanafi Madhab stating this, the sound opinion of the Madhab does permit women to visit graves. See the link below for more details.
وَبِزِيَارَةِ الْقُبُورِ وَلَوْ لِلنِّسَاءِ لِحَدِيثِ «كُنْت نَهَيْتُكُمْ عَنْ زِيَارَةِ الْقُبُورِ أَلَا فَزُورُوهَا»
(قَوْلُهُ: وَلَوْ لِلنِّسَاءِ) وَقِيلَ: تَحْرُمُ عَلَيْهِنَّ. وَالْأَصَحُّ أَنَّ الرُّخْصَةَ ثَابِتَةٌ لَهُنَّ بَحْرٌ. (رد المحتار على الدر المختار).
Imam al-Haskafi: And (it is recommended) to visit graves, even for women. Due to the Hadith, ‘I forbade you from visiting graves, now visit them.’
Imam Ibn Abideen: His saying, even for women. It is said that it is prohibited for them (women). But the soundest opinion is that the dispensation is confirmed for them too, Bahr. (Radd al-Muhtaar).
And Allah (Most High) Knows Best.
– Answered by Shaykh Noorud-deen Rashid (25.10.2021)
Can women visit graves in the Hanafi Madhab?
See also (video):