While sometimes it may be hard to step back from a particularly interesting student project, you just have to remember that your role on the project is just as vital as theirs: A teacher. As a teacher, your job is to explain and teach so that they can actually create an implementation. Even though you don't touch the code, the project couldn't be completed without you.
It may also be helpful to step back during the design phase, because if you haven't been responsible for the design, you feel less like the project is your baby. Also, maybe start your own projects. If you are getting engaged in everything that your students do, then maybe you should become invested in some new project of your own to serve as a distraction from what your students are doing.
It is OK it guide the student to a solution, and even guide very closely. It's good to get the student to understand how their code could be better by simply asking questions about them. Questions are good, because they help the students understand what is going on and the help you as a tool to guide them. If you simply confine yourself to asking questions, even very specific ones, like "Why wouldn't you put the code between lines 23 and 27 into it's own method?", because that's better than telling them how to do it or doing it yourself.
It may also be helpful to you to remember that the maintainer of the project will be the student, and so they have to know how it works. If they don't, although the project may look good when it leaves your workshop, it will fall apart because the projects owner won't be able to maintain the code when inevitably it has to be changed.