Improve handling of `@scope` related at-rules (#20369)