How to limit editor blocks without wrecking the Site Editor
A junior dev used the allowed_block_types_all filter globally and it broke the Site Editor. Here is why that happens and how to check the context so you restrict blocks for posts and pages while leaving templates alone.