The problem seems to be that once the bot is within a certain distance of the current waypoint it's navigating towards (for example once inside 2 meters) it moves on to the next waypoint. The main reason for this is that the closer it gets to the point it is running towards, the more erratic it looks, trying to get "exactly" to the waypoint. The result of this, especially if the path is coming from the left or right of the doorway (not directly straight-in from the front), is that once it gets close to the doorway, it turns towards the next waypoint (inside the building) and runs into the doorframe or wall next to the doorway.
The best way to make the bot navigate better through doorways is to somehow add a waypoint that is a few meters directly in front of the doorway, and navigate to that point before turning towards the door.
In the attached image, figure 1 shows the current path behavior. When the path approaches the waypoint in the doorway, once it gets within X meters of the waypoint (the blue circle shows this range), it turns towards the next waypoint and tries to follow the orange dashed line.
Figure 2 shows what happens if you add a waypoint directly in front of the doorway.