Generate autotiles 2x2/3x3min from sprites whith 5 tiles or 3x3 from 8 tiles, and add to tileset.
The autotile name defines the name of the sprite from which it was created.
You can add autotiles to an existing tileset. Old tiles can be replaced with new autotiles if they have the same name.
Result
For correct display of 3x3 autotiles, cell size in TileMap must be 2 times smaller than tile size