Thanks @RGJ. This PR will backport the fix we made on latest to stable:
latest
stable
https://github.com/discourse/discourse/pull/35116