Answer: The Gemara (Chullin 105a) writes that after eating meat, Mar Ukva would wait until the next meal before eating milky food. There is a machlokes however, as to how long this wait is.
Rambam (Maachalos Asuros 9:28) and the Shulchan Aruch (YD 89:1) writes that one must wait six hours after eating meat before eating cheese while the Rema writes that one only has to wait one hour, wash their hands and rinse their mouth first. While the Dutch community typically waits one hour and many wait three, the Taz (YD 89:2) notes that the main minhag is to wait six hours.
The Gemara (Berachos 33a) writes that we learn from a passuk not to say a beracha levatala. According to Rambam (Berachos 1:15) and the Shulchan Aruch (OC 215:4), it is forbidden mideoraisa while Tosafos (Rosh Hashana 33a) holds that it is forbidden miderabanan (See Mishna Berura 215:20).
R’ Moshe Stern (Baer Moshe 4:24) and R’ Moshe Sternbuch (Teshuvos Vehanhagos 2:389) thus write that providing one had finished their meal and it had been an hour since they ate meat, one who accidentally recited a beracha on milky food should taste the food rather than say a beracha levatala.
While R’ Sternbuch writes that this doesn’t necessarily apply to sefardim who follow Rambam and the Shulchan Aruch, R’ Ovadia Yosef (Yabia Omer YD 2:5; Yechave Daas 4:41) writes it is still preferable to taste the food. While there is a machlokes as to how long to wait after meat, all agree that it is forbidden to say a beracha levatala.
In conclusion, providing one is no longer in the middle of their meaty meal and at least an hour as elapsed since they had meat, one who accidentally recites a beracha over milky food should taste a little bit of the food rather than say a beracha levatala.