After dealing with the Y1 pulley set screws backing out numerous times on my XXL and messing up jobs, finally decided to implement regular socket head screws - covered here and other places, but a couple points to add for others with the same problem.
The socket head screw size you need is M3 x 8mm, you can get a multi-size box from Amazon for $6 that will be more than enough.
You want to use “purple” thread locker, it’s low strength and made for set screws. Several brands out there for about $5.
Easy fix for about $11. If you have an Ace Hardware nearby, the screws are about $0.15 each, you need 6 of them (8 if you have the belt driven Z). Either way, well worth the few dollars to not have these backing out and the pulley slipping!