A video monitor with a voice option so that you can tell child to lay down as soon as they stand up can work wonders because they hear your voice but can't see you.

Other option is to put playpen right near you so you can do what you want to do during naptime while telling child to stay put. Whether they nap or not is immaterial as the purpose is to learn to stay put.