Items randomly disappear when dropped. Maybe they will, maybe they won't. When they do, they're gone forever.
It turns out that the datapacks that I had installed were somehow causing the problem. After deleting them, the issue went away. How silly of me to use old datapacks. Expanded End was causing the problem. All my others work fine.
This report appears to be a duplicate of MC-205130, which was later marked as invalid, as this issue is caused by the datapacks that you are using. See the parent ticket for further details.