The key is to use htmx.process https://htmx.org/api/#process to give life to your htmx code defined that way.
Here's the blog that I found that explains about this, also using Django, DataTables, and HTMX, addressing exactly your situation: https://til.jacklinke.com/using-htmx-and-server-side-datatables-net-together-in-a-django-project
The key in the blog is to use htmx.process in the DataTable initComplete callback.
...
"initComplete": function( settings, json ) {
htmx.process('#personTable');
},
...