Thanks for your interesting problem AND your solution.
Looking for a solution without the kableExtra package I saw a similar issue on the forum.
After following the suggestion of Ranae and adding to the yaml
header-includes:
- \usepackage{float}
- \floatplacement{table}{H}
I got the table in the correct place (I think).
Of course this could bite the placement of other tables.