Bug is back in 1.19.21
The issue occurred as described on Realms when the main island gateway was used after defeating the End Dragon. The issue did not occur on a copied download even when the main island gateway was not used.
I tested this on local games and on realms and have been able to reliably reproduce this issue on realms only.
Can confirm, also occurring in 1.19.21 bedrock on realms, cannot obtain bad omen effect when killing pillager captain, even when only killing by punching with no weapon.