TileMapLayer get_cell_alternative_tile always returns 0

Godot Version

Godot v4.3

Hey,
i’m using the TileMapLayer in a project and i’m struggling with replacing a tile with it’s alternative. I have created an atlas and defined an alternative tile:
grafik

I want to set the alternative during runtime like this:

	var tileMapCellId=tileMap.get_cell_source_id(currentTile)
	var tileMapAtlasCoords:Vector2i=tileMap.get_cell_atlas_coords(currentTile)
	var alternativeTile=tileMap.get_cell_alternative_tile(tileMapAtlasCoords)
	tileMap.set_cell(currentTile,tileMapCellId,tileMapAtlasCoords,alternativeTile)

get_cell_atlas_coords returns the correct atlas coordinates but get_cell_alternative_tile always returns 0

I have followed the official documentation to create the alternative tile:

Does anyone have any idea why i’m not getting the correct alternative tile?