Navmesh not working well in packaged build

Hi all. I am making a game with AI that uses the navmesh. When I play the game in the editor or standalone mode, the AI works fine and is able to navigate properly. However, when the game is packaged the AI is not able to navigate properly. This problem seems to affect only some people who have tested our game but not all of them.

The image above shows where the problem always occurs. The game is programmed so that at some point in time, the AI spawns behind the door then the door opens. Once the door is opened, the AI leaves the room. But what ends up happening is he keeps walking right next to the doorframe. Almost like he is blocked by some invisible wall. Below is how the bug looks after the door opens.

The navmesh is set to change dynamically at runtime. I am using unreal engine version 5.1.1. I changed the door so that it can’t affect the navigation (as seen in the first image) but that did not work. I checked the player and visibility collision viewports as well and it seems like nothing is blocking the way. Any help would be appreciated thanks!