If you are already using the Character as your base pawn, it has a MovementComponent. You can bind a function to the MovementComponent’s OnMovementUpdated event and this will give you his current position every tick. From here you may be able to take his current position and project it to the NavMesh somehow and if it is not on the NavMesh then call the MovementComponent’s StopMovementImmediately() function. You should look at the UNavigationSystem::ProjectPointToNavigation function to see if this can help you determine if his location is or is not on the nav mesh.
Good luck!