Setting atlas texture to Sprite2D loosing alpha

Godot Version

4.3

Question

Hey having a weird issue I can’t find answer to online. Hope someone can help here maybe.

On the image the marked thing is a Sprite2d with an Atlas texture set on it, it has some alpha in it and it’s visible in game fine. That one has been manually placed in the editor as a node. The rest of them are generated in code on startup with the same atlas texture set on them.

When doing that the once that were created in a script just seem to loose the alpha from the texture. Or at least they loose the semi transparent pixels. Like anything that’s not 0 or 1 on alpha is set to either of those. So there is no in between it’s full transparency or no transparency.

The way the sprites are created is pretty simple it’s just:

var star = new Sprite2D();
star.Texture = tex;
AddChild(star);

Where tex is exported and set to the same texture as the one manually placed star that looks fine on the image. No idea why this is happening. Any help?

Tried checking:

It just says “false” on them which is just not true cuz the original image is a png with alpha.