I think this will be fixed following:
https://github.com/discourse/discourse/pull/22179
To be merged soon.