Man, I spent 2 days looking for how to do it and never managed to do it, but with your video it finally came to an end. Thank you very much, I just have to thank you, you are incredible!
I think I figured out the problem, I think the problem is the repeater, I removed it and replaced it with just redstone and walked away and back to the command block location and it didn't activate. I have no guarantee that this is the problem but the command block did not reactivate on its own again. edit: Forget what I said, the bug remains.