Texturerect not working as it should

Godot Version

4.6

Question

Hello! in my game i have these cards, where i want the items to sit right in the middle of them. in the editro they all do that just fine, but when i run the game the items end up in all sorts of different positions and i cant figure out why. ive attached some images with my node configs and some code that im not sure is helpful but it doesnt hurt to have it. please help

if selecteditem.icon.resource_name in ["bbs","recoded"]:
				print(selecteditem.icon.resource_name)
				icontexture.texture=selecteditem.icon
				icontexture.rotation_degrees= (-135.00+89.00)
				print(icontexture.rotation_degrees)
			if selecteditem.icon.resource_name == "unix":
				print(selecteditem.icon.resource_name)
				icontexture.texture=selecteditem.icon
				icontexture.rotation_degrees= (-135.05+89)
			if selecteditem.icon.resource_name == "kh3":
				print(selecteditem.icon.resource_name)
				icontexture.texture=selecteditem.icon
				icontexture.rotation_degrees= (-140.00+89)
			if selecteditem.icon.resource_name == "days":
				print(selecteditem.icon.resource_name)
				#icontexture.texture=selecteditem.icon
				#icontexture.rotation_degrees= (-90+89)
				print(icontexture.rotation_degrees)
			if selecteditem.icon.resource_name in ["kh1","kh2","ddd"]:
				print(selecteditem.icon.resource_name)
				icontexture.texture=selecteditem.icon
				icontexture.rotation_degrees= (-45.00+89)
				print(icontexture.rotation_degrees)
			else:
				icontexture.texture=selecteditem.icon

We cannot see your anchors presets, but you should set your anchors to be “center” both vertically and horizontally.