Z-fighting on layered texture?

I have an model definition that looks like this:

{
    "parent": "item/handheld",
    "textures": {
        "layer0": "epvz:item/pumpkin/packet",
        "layer1": "epvz:item/premium_cooldown_overlay/f2"
    },
    ...
}

Where epvz:item/pumpkin/packet is a rectangle shaped texture, and epvz:item/cooldown_overlay/f2 is an overlay that is the exact same shape as the texture on layer0, but all pixels are transparent black that overlay layer0 to show cooldown. Also not sure if its relevant, but the ... part is the "display" key that changes the item's scale in first person hand and third person hand.

The final model looks fine and layered just fine on the texture part, but Z-fighting appeared on the upper and lower edge of the texture. The edge here refers to the thickness minecraft adds when defining an item model through texture. Sorry I can't screenshot it cause I currently reduced the pixel the cooldown overlay has by one to avoid Z-fighting but then the pixel on layer0's texture's edge won't be overlayed.

Continue to help post