Thank you for reporting this bug. It was fixed in this PR
https://github.com/discourse/discourse/pull/35960