Repository: ant-design
Issue: Form组件中搭配使用Row,Col与ConfigProvider, 会引起FormItem中Label对齐方式改变的问题
Labels: Inactive,unconfirmed

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/jin-xiao-yan-antd-5-12-8-forked-tw6mr4?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clr7r2oxi00063b6hxvt12u36%2522%252C%2522sizes%2522%253A%255B100%252C0%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clr7r2oxi00023b6hccafhjhh%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clr7r2oxi00033b6hyvwzsqxx%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clr7r2oxi00053b6hm1xd85qo%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clr7r2oxi00023b6hccafhjhh%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clr7r2oxi00013b6hpp8m7964%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fdemo.tsx%2522%252C%2522state%2522%253A%2522IDLE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A28%252C%2522startColumn%2522%253A3%252C%2522endLineNumber%2522%253A28%252C%2522endColumn%2522%253A3%257D%255D%257D%255D%252C%2522id%2522%253A%2522clr7r2oxi00023b6hccafhjhh%2522%252C%2522activeTabId%2522%253A%2522clr7r2oxi00013b6hpp8m7964%2522%257D%252C%2522clr7r2oxi00053b6hm1xd85qo%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clr7r2oxi00043b6hvzo84gcx%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522clr7r2oxi00053b6hm1xd85qo%2522%252C%2522activeTabId%2522%253A%2522clr7r2oxi00043b6hvzo84gcx%2522%257D%252C%2522clr7r2oxi00033b6hyvwzsqxx%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clr7r2oxi00033b6hyvwzsqxx%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D)

### Steps to reproduce

点击toggle按钮, 再点击toggle按钮, 观察name2的对其位置.  


### What is expected?

在点击toggle前和点击toggle后, name2的对齐位置都不变

### What is actually happening?

点击toggle后, name2的对齐位置从靠左变成了靠右

| Environment | Info |
| --- | --- |
| antd | 5.12.8 |
| React | react 16.8 ~ 18 |
| System | macOS 13.5.1 (22G90) |
| Browser | chrome 120.0.6099.199 |

---
经过一些简单排查, 怀疑问题在NewCol中的ConfigProvider里, 只要传入了token, 且token不是一个空对象，就会出现以上bug.

**原因初步分析:**
这两个class起了冲突
class1: .ant-form-vertical .ant-form-item-label (ant-form-vertical是Form组件层级定义的className)

:where(.css-dev-only-do-not-override-dkbvqv).ant-form-vertical .ant-form-item-label {
    padding: 0 0 8px;
    margin: 0;
    white-space: initial;
    text-align: start;

class2: .ant-form-item .ant-form-item-label (ant-form-item是FormItem组件层级定义的className)

:where(.css-dev-only-do-not-override-qvhge9).ant-form-item .ant-form-item-label {
    flex-grow: 0;
    overflow: hidden;
    white-space: nowrap;
    text-align: end;
    vertical-align: middle;
}
本来界面初次渲染时class1的优先级比class2高, 因此text-align: start是生效的, 但点击toggle之后, class2的优先级变成比class1高了，因此text-align:end生效, 引起了bug.

**为什么会发现这个bug:**

因为我们基于antd组件包了一层作为自己的组件.  对每个组件都包裹了ConfigProvider以覆盖antd默认样式.  
当使用Form组件, 并使用包裹了antd组件后的新Row和新Col组件时, 就遇到了以上Bug.



<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->