Now there is an easy way using the hideSelectAll property
hideSelectAll
<Table rowSelection={rowSelection} .... />
and setting rowSelection as
const rowSelection: TableProps['rowSelection'] = { hideSelectAll: true, .... }
Ref: https://github.com/ant-design/ant-design/issues/14581