If illagers are spawned near a village before a raid, then a raid is triggered, the illagers will join the raid and make up the first wave, however when they kill all the villagers the raid ends abruptly, the raid bar disappears without displaying "Raid - Defeat", and the illagers don't celebrate
Steps to Reproduce:
Place a bed and spawn a villager
Give yourself bad omen effect
Spawn any illager before first wave starts
If illager is having trouble killing villager then help it
Expected result: Raid bar indicates defeat and illager celebrates
Observed Result: Raid bar disappears immediately and illagers don't not celebrate
Update: This also works if you spawn illagers after the raids starts, but only if they are spawned before the actual first wave of illagers spawns in (before the raid bar fills up)
Can confirm in 1.20.3