You can spray the back of the template with 505 adhesive. The template will stay in position and can be re-used many times.
They also make little non-slip dots to use on the backs of rulers to stop slipping. They aren't too expensive for a sheet of them. I've not tried it, but I can't see why those wouldn't stop-home made templates from shifting while you cut, too.