I am having this problem but on modded 1.19.2 (doesn't happen in vanilla, and afaik nothing change from when I last played and it worked just fine). Have you figured out the issue by chance?
its not a duplicate bug
it was caused by itemscroller not optifine, and wasnt a cartographer
Turns out this is an issue with the item scroller mod so just FYI to anyone out there with this problem as well
afaik it seems to be random
I am having this problem but on modded 1.19.2 (doesn't happen in vanilla, and afaik nothing change from when I last played and it worked just fine). Have you figured out the issue by chance?