Backport #28492 Fix #30019 Co-authored-by: The Magician <142242365+TheMagician23@users.noreply.github.com>