Coulda sworn Pillagers can only spawn on grass blocks or sand. Luckily, the floors of the interior/underground tunnels and rooms of our spawn complex are all either stonebrick/smoothstone variants, jack-o-lanterns for light, or mycelium (which is harder to accidentally break when moving rails around with a nice pick). So we haven't had any indoor raid spawning yet. Just yesterday I did find a patrol just outside our perimeter fence and I took it out, then single-handedly fought off the resulting raid waves, only dying once, and that because I stupidly fell into a stairwell I'd trapped like 3 of them in and then a ravager fell in on top of us. But haven't had any indoor spawns yet, either from patrols or raids around the autofarm tower whose farmer-workers make it a village. But if they can spawn on other surfaces, we may have to rethink our defensive strategy.
I've thought about replacing the grass and paths in our village with leaves sheared from trees. But that is kinda ridiculous.