Constraints on dark photon dark matter using data from LIGO's and Virgo's third observing run