Export spritesheet Trim Sprite doesn't work for one of my layers

I found a case where exporting spritesheet with option Trim Sprite leaves a big blank/padding above my sprite. Normally this only occurs when the sprite is moving up and down in the animation, so the standard cell allocates enough space for all possible movements.

Trim Cell works fine, but I need a stable pivot position, hence Trim Sprite.

2022-05-11 v1.2.30-1.2.34.1 Trim weapon leaves padding even after a By Grid refresh

Tested versions: v1.2.30 and 1.2.34.1 (Linux)

You’ll probably need the aseprite file as it’s a particular setup with 5 layers. I can send it privately on demand.