Hi, I tried to reproduce the issue and was able to reproduce it with scripts shared by Tomas. I tried testing it from PG17 to PG 11. This issue is reproducible for each version.
Next I would try to test with the patch in the thread shared by Amit. Thanks, Shlok Kumar Kyal