Enemy pathfinding on a tilemap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Creka

I have a small project with a tilemap that randomy generates a map (100x100 tiles), a player and an enemy. Nothing special. So i was trying to get pathfinding to work on the enemy and have a (before) working script from youtube.
The tilemap itself had no navigation tiles applied but the bake navigationmap option turned on. Everything went smoothly and i even could place other tiles (walls) on the map and it instantly recalculated the path without any lag but the path was right on the edges of walls. So i tried to fix this problem by applying small navigation areas on the walkable tiles and increasing the default edge connection margin.
All of that destroyed this smooth running function and now when i run the game it loads a little longer and when i place a wall now it freezes for 1 second due to recalculating the navigation
Is there any way to revert this?