The mesh generation can produce unexpected results in some unknown cases. When this happens, it is advice to use the Sprite Editor Window's Custom Outline module (https://docs.unity3d.com/Manual/SpriteOutlineEditor.html) to tweak the outline so that the mesh generation gives the desirable result.