The first core modification works (I can now see existing IDs on the list) but it just updates the existing one when adding a new one. However I don’t have the other line in modules/backend/behaviors/relationcontroller/HasPivotMode.php.
Ok, this has been fixed in v3.6.19. The following has been added to the documentation.
Allowing Duplicate Relations
In some cases you may want to associate the same relationship twice or more, using different pivot data for each attached record. Below is an example that shows a database table structure that has an incrementing primary key on the join table instead of a composed primary key.