The following repository refers to How you can protect your code from commits occurring in event subscriber code
For more information see the following link:https://ivansingleton.dev/how-you-can-protect-your-code-from-commits-happening-in-event-subscriber-code/