[0] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3586871/ [1] https://www.ncbi.nlm.nih.gov/pubmed/30955915
"There is conflicting evidence on whether HPV vaccines are efficacious in preventing vaccine type HPV associated anogenital pre-cancer in women who had evidence of prior HPV exposure to the same vaccine type."
This section cites Miltz et al. (2014; PLoS ONE) and Lehtinen et al. (2013; Nature Reviews Clinical Oncology).
My impression is that efficacy against the same strain hasn't been demonstrated, but it's very clear that people infected with one strain (say, 6) can be subsequently infected with other strains. In that case, there's a partial benefit of the vaccine, since it'll help with the other 1/3/8 strains that the vaccine targets (plus maybe a few more, as there are also off-target effects).