Using prefab brush in tilemap, function HasTile returns null

I followed an example to create a prefab brush because I wanted to add a script to a tile. It seemed to work OK and I can select my new brush and paint with it, but in the script if I check the tile position where I’ve used the prefab brush (using the HasTile method), it returns null. If I do a similar check for other tiles painted using the default brush, it works OK and returns the name of the tile.

Am I doing something wrong here or is it not possible to do what I want? I’ve put some example code below

Vector3Int cell = new Vector3Int(0, 0, 0);
Tilemap tileMap;

tileMap = FindObjectOfType<Tilemap>();
cell.x = 0; cell.y = 0;
if (tileMap.HasTile(cell))
    Debug.Log("tile at 0,0   = " + tileMap.GetTile(cell).name);
else
    Debug.Log("tile at 0,0   = null");

bump! I need this answer as well!

Im trying to have a prefab check for the tiles around it by position and they all come back null

Same thing here, I guess it is pretty easy for someone knowing the answer?

Prefab Brush as far as I can tell only paints the prefab aligned to the grid, it creates a new GameObject for each one, it is not a tile in the tilemap.