The variable has a dynamic type, so it can't autocomplete the methods,
you have to use a typed variable instead
@onready var tilemap : TileMap = $TileMap
this is currently broken when the initial value inherits Node and makes the variable's type Node
instead,
so you actually have to use an inferred type with a cast.
@onready var tilemap := $TileMap as TileMap
more information here.
(that page is slightly outdated, static typing already improves performance in 4.0)