When I switch from object mode to texture paint, everything seems fine and works as usual. BUT when I switch back to object mode, seemingly random materials turn a dark grey out of nowhere. This happens when switching between the "Texture Paint" tab and the "Layout" tab, and also when switching between "texture paint" and "object mode" in the viewport dropdown. The only way to get the textures to show again is to undo several times (to right before I switched to texture paint mode). I am not doing anything in either mode. Literally all I'm doing is switching.
I am in lookdev/material preview. In rendered view (cycles), it still looks completely normal.