If you recall, Matthew related this incident similarly. John recounted it with significant differences. I like Mark’s account. Some interesting nuances.
Most of Jesus’ listeners would have been aware that Jesus was referencing Deuteronomy 15 in regulations for dealing with the poor and people who had suffered loss.
I think in our day, we need to extend the analogy to the sick, and to those who are feared for potentially being sick.

Mark 14:3 And while he was at Bethany in the house of Simon the leper, as he was reclining at table, a woman came with an alabaster flask of ointment of pure nard, very costly, and she broke the flask and poured it over his head. 4 There were some who said to themselves indignantly, “Why was the ointment wasted like that? 5 For this ointment could have been sold for more than three hundred denarii and given to the poor.” And they scolded her. 6 But Jesus said, “Leave her alone. Why do you trouble her? She has done a beautiful thing to me. 7 For you always have the poor with you, and whenever you want, you can do good for them. But you will not always have me. 8 She has done what she could; she has anointed my body beforehand for burial. 9 And truly, I say to you, wherever the gospel is proclaimed in the whole world, what she has done will be told in memory of her.”

Would have Jesus accepted the close and intimate offering if he’d known the offeror was infected with COVID-19? Wouldn’t the naysayers have reacted the same if the woman wasn’t wearing a mask?

I think we all understand Jesus wouldn’t have drawn back. The example took place in the house of a leper. Jesus never refused the sick. He never will. Of course, those who took offense would have been just as offended as those who, today, take offense at maskless passerbys.

If the virus runs unhindered, we humans will pull through stronger than ever. If fear and isolation continue to hold sway, well, I don’t think future generations will remember the alarmists as favorably as we remember this supplicant.