This glitch has been happening for a long time, and I've tried everything to fix it. The only thing that works is removing operator (OP) status. If no one is OP, the glitch doesn't occur. But as soon as someone is OP—even if they're offline—it starts happening again.
Also that doesn't happen when the bedrock Player is op himself