One of the big publishers put heavy pressure on Amazon to patch this exploit or else they would pull all their content from the platform (or so I was told).
(I worked at Kindle 2017-2019, and was on the team that wrote the code that OP reversed engineered)