If you have Optimized Battery Charging turned on, charging will stop at 80% or so when hooked up to the Studio Display.
To improve the lifespan of your battery, Optimized Battery Charging allows your Mac to learn from your daily charging routine so that it can delay completing a full charge in certain situations. And with Charge Limit, you can limit what your Mac considers a full charge.
support.apple.com
Sometimes it takes a bit for the MacBook to learn your charging routine. In my case, it took a few weeks.