When the slide is locked back, the barrel is not locked, so it is normal for it to move in that configuration. Dry fire away! It will not hurt your gun and it is good for practice. Use a snap cap if you would like to extra sure, but it is not necessary. Also, be sure to keep the frame rails well lubed. Especially for range, I prefer grease, such as slide glide, shooter choice red grease etc. For carry, you can use a good oil if you are hesitant about using grease on a carry gun. I have always used grease on my P229 for carry. Never a problem.