This change was merged recently which should solve it:
https://github.com/discourse/discourse/pull/37271