Catalyzes the transfer of glucose from uridine diphosphoglucose to 5-hydroxymethyl cytosine of T4 DNA to yield glucosyl 5-hydroxymethyl cytosine (glc-HMC) (PubMed:22229759). This DNA process seems to occur immediately after DNA synthesis since the DNA alpha-glucosyltransferase interacts with the clamp protein gp45 (PubMed:22229759). The glc-HMC modification protects the phage genome against its own nucleases and the host restriction endonuclease system (PubMed:22229759). The glc-HMC modification also protects against the host CRISPR-Cas9 defense system (PubMed:26081634). Transfers a beta-D-glucosyl residue from UDP-alpha-D-glucose to a hydroxymethylcytosine residue in DNA. Genetic information processing; DNA modification. Monomer.