I found this bug while messing around with an Oritech build designed for moving Oritech's Portable Tank via the Oritech Item Pipes.
There's an issue on the Oritech repo which has detailed steps for reproducing the problem in Oritech, but here's the gist:
Oritech Portable Tanks store Fluids (implemented via the Fabric Fluids API). When crafted and initially empty, Portable Tanks can be stacked up to the standard limit of 64. However, when a Portable Tank has fluid content, the tank uses DataComponents.MAX_STACK_SIZE to change the individual tank's stack limit to 1. (That is, tanks with fluid in them are not stackable).
The bug in question arises when a Portable Tank is moved into an inventory via Fabric's Storage.insert(). In the case where a Portable Tank with a given fluid content is moved into an inventory which already contains a Portable tank with identical fluid content (for example, two Portable Tanks with the 256B limit of some fluid), the second tank is deleted / disappears.
(Presumably this would occur for any item whose DataComponents specify a different stack size from it's default, but I don't know of another example to test with). Update: I confirmed this is not specific to Portable Tanks or Fluid storage. An easy way to reproduce the bug is with an item that has had a max_stack_size set with the give command - e.g. /give @s diamond[max_stack_size=1].
I've got a PR coming which will explain the problematic call stack in more detail - will add a link here shortly.