You can achieve this by overriding the row expansion logic manually within your row or cell click handler.
Add this:
onClick: () =>
table.setExpanded({
[row.id]: !row.getIsExpanded(),
})
This is a solution i found from the GitHub discussion linked here