It depends on the park. I worked attractions in Fantasyland, and there were certain areas we were able to access to look for lost items without needing to follow lockout/tagout. These were very limited. Other times, we could ride through the ride to retrieve an item if need be, that was most common on Pooh.
I then worked 7 years as a rides lead/supervisor at a Cedar Fair park. As a lead or supervisor I could walk the ride footprint when the ride was in operation and did on many occasions to look for lost articles, I just could not go into any “low zones”. If the item was in a low zone, we would only retrieve items of value such as car keys, cell phones, or prescription glasses as these required shutting down the ride. Otherwise, we would have to wait until the park closed for the night.
Most people don’t understand how hard it is to find a specific item. I would say I was able to locate items less than 50% of the time. A lot of coasters have areas of the track that are simply inaccessible or have lots of foliage/water/etc. Even if we do find something, the frames may be broken, lenses popped out, phone smashed, etc.
Best advice: don’t wear hats or glasses on rides. Keep phones in a secure cargo pocket or bag if the ride allows bags. It’s not just a convenience thing. A poorly timed dropped item could shut the ride down if it breaks the photo eye (sensor similar to what is on a garage door) or could injure someone. I knew someone who sustained a concussion because the person ahead of him had a cell phone out on a coaster and lost control of it.