[I posted the details on stack overflow](https://stackoverflow.com/questions/79164869/jpa-many-to-many-with-just-a-list-of-ids). Issue description and link to github repo to simulate the problem.