Another cause of this could be accidentally having multiple material slots for the object and editing a material in one that isn’t actually assigned to any faces, which could explain why assigning in Edit Mode fixed the issue. Another fix is removing all other material slots that aren’t being used.