I had the exact same experience at Best Buy the other day. Tried out the Studio Display, thought the camera looked fine, then tried an iMac M3 and the camera was A LOT better. It does make the pricing hard to swallow knowing that there is some dated tech in it.
That said, I still bought the Studio Display and I'm pretty sure I'm going to keep it. The screen is really nice, everything just works, and the setup is very clean. A side thing I didn't expect is that the display turns on immediately vs waiting 3-5 seconds when my Macbook is connected to 4K monitors at work. It's a little thing, but delightful.
Oh and after using the webcam for a few days, it's certainly not the best, but it's a solid upgrade from the one in my 5K iMac and still better than most of my coworkers on the other end of video calls. I also like that the latest update allows you to manually zoom and pan to frame yourself exactly how you want.