Reset the buds themselves, not just your phone. Most disconnection issues come from the earbuds' firmware or internal state getting corrupted, not the pairing itself. On Galaxy Buds2 Pro, hold the button on the case for about 10 seconds until the LED flashes red and white - that's a full factory reset. Then re-pair from scratch. I'd also check if you're running the latest firmware on both the buds and your phone through the Galaxy Wearable app, since Samsung pushes updates that fix stability issues pretty regularly.
The environment matters way more than people realize though. Work offices and buses are often packed with WiFi networks and other Bluetooth devices competing for the same 2.4GHz spectrum - it's the same frequency as microwaves and tons of other stuff. If the disconnects happen consistently in one location but not at home, interference is almost certainly the culprit. You can't really fix that except by moving away from the source or, if you've got control, asking whoever manages your work WiFi to adjust their router placement.
One more thing to try: disable and re-enable Bluetooth on your phone, then check the Galaxy Buds2 Pro settings in the Wearable app for any power saving modes or connection optimization options that might be enabled. Sometimes the phone's battery saver or aggressive Bluetooth power management kicks in and causes drops. If none of this works after a full reset and firmware update, the buds themselves might be aging - batteries degrade and can cause connection instability after about 18-24 months of heavy use.