Single custom items are not stackable
When I have a single custom item I'm not able to combine it to a stack again. This is most likey because of the properties from the damageable items. When I take two stacks with an amount > 1 they combine but 1 item is left out.

The inventory click event could compare cursor and clicked slot to increase the amount of the slot with the amount of the cursor. Maybe it's even possible to set NBT tags to allow items to be stackable (that normaly are not)
Unfortunately, there is no easy way to fix this, since the stacking checks are made client side. In order to fix this, you would have to recreate all checks server side, and add exceptions for Custom Items. However, this could lead to duplication glitches, as you are handling otherwise unstackable items like Diamond Swords. Thus, it's best to avoid this, and instead it might be better to use the new 1.14 approach of changing textures, which would allow to use stackable items with different textures.