I tried to change the order of script lines: first protection, and saving afterwards. This works! But this way the bot creates the pages under my sysop name, because they are already protected.
... and removes the protection, becuse protection was only against creating, not against editing. I had to protect it again. So not good at all.