I'm sure they could - it's not that difficult to make an engine that works upside down. But the point is they haven't and won't whilst there is nowhere to test it and the money would be better spent elsewhere.
Shot - with high, sustained lateral G, the oil is still at the bottom of the oil tank (so swirl pots can go at the top to separate the oil), and the oil is still scraped off the crank at the bottom and scavanged at the bottom, with probably two or four scavenge pumps distributed around the sump.
The point is that for more than a few seconds inverted a whole new engine would be needed. And transmission probably. And cooling system? All the plumbing would need to be different to cater for the scavange pumps over the engine...
It hasn't been done. If it had, we'd have heard about it by now, as it would be a marketting tool.
But it could be done, if a team (or private individual) wanted to spend (waste) 20 million doing so by designing a car from scratch for the purpose.