Ok, so a very peculiar and interesting thing happened. This could be a feature, but I will report as bug just in case.
I had a 20x22 fenced area (most of it exposed to the sky, but with a 3x3 covered area in the center). The area was fully carpeted, with trapdoors hanging on the fences (to prevent spider climbing). In the 3x3 covered area I had a Pillager banner hanging on obsidian blocks (nether portal).
So, I was walking around the fenced area collecting sand and 2 Pillagers spawned during the day (1 patrol leader, 1 regular). The patrol leader spawned either on the trapdoor, on the fence or on the carpet, because we was trapped inside the fenced area.
The other pillager spawned either on the trapdoor, on the fence or outside the fenced area (sand), because he managed to chase me outside the fence, while the leader got himself trapped inside the fenced perimeter.
I saw them spawning, but it was so quick and it surprised me, so I don't know exactly where they spawned. But I assume they are not supposed to spawn on transparent blocks (fences, trapdoors or carpets). And since the leader was inside the area, he definitely spawned in one of these blocks.
I like the fact that this happened, though. It made me think that if I keep an Illager banner around, a patrol could spawn in the area regardless of typical spawning conditions (even though I had renamed the banner already).