As suggested [here](https://github.com/squidfunk/mkdocs-material/issues/5208#issuecomment-2318940170) this plugin worked great for me: https://github.com/PLAYG0N/mkdocs-panzoom