I’d don’t feed or encourage it like that.
In the case of urban fox attacks.
I strongly believe those foxes went in search of the source of the food, in which they have been accustomed to eating.
They survive and live well off our scraps. But once we get fed up with them and rats, etc. A bigger effort is put in to keep rubbish secured.
Foxes now associate food with humans. So if the foods not there, they go in search…Into the homes. That’s why small children get attacked.
Fed a fox in your garden and you could be inviting a wild animal with very very sharp teeth and an impressive bite into your home.
Also it may visit a not so friendly neighbours garden and BOOM! no more mr Reynard.
If you are a little concerned for it. Take the food into the fields for it, better still make a throw it.
It’s better for the fox to fear all men, than to trust one.