I had the same issue. In my case upgrading kafka to 3.6.1 helped, it was most likely resolved in this bugfix.