We would not say that either is “safer” than the other.
Properly installed, correctly operated, and regularly maintained, a fireplace is as safe as the toaster on your kitchen counter! That’s why having an experienced, certified professional install your hearth appliance is so important. They are familiar with the manufacturer’s requirements and all applicable codes.
However, it’s certainly worth noting that there is much greater room for “operator error” with a wood-burning fireplace vs. a gas model. Most gas appliances are turned on/off with either a wall switch or a remote control. The heat output on a gas fireplace is limited and defined. But with a wood-burning fireplace, stove, or insert, the heat output can vary tremendously, and the appliance can be over-fired, causing a hazardous situation. There is no doubt that burning wood and maintaining the appliance and chimney are more involved than with a gas model. But again, adequately installed, operated, and maintained, both fuels are perfectly safe for use in your home or business.