Just checking you don't have any automatic processes that might be enrolling/unenrolling.
As well as the site logs, which can be a bit overwhelming, each course has its own log too, from the course administration block.
If I can't reproduce an error, I like to go and visit the teacher and get them to do the task while I watch. It's the simplest way to suss things out.
Mark