cherry-pick #35125 to branch-2.1 Co-authored-by: morrySnow <101034200+morrySnow@users.noreply.github.com>