Something is causing my mesh to show strange shadows along edges in render mode, but not in the material preview. I don't know what's causing it or how to fix it, so I'm hoping someone here has an idea.
Things I've tried so far that haven't worked:
• recalculating normals
• resetting vectors
• clearing custom normal split data
• disabling all modifiers
• hiding all other objects
• merging by distance and checking for non-manifold geometry
• shading flat, then smooth again (shadows are even worse when shaded flat)
If I import the same mesh in a new scene, this also happens, but I can't find any doubled faces, vertices, etc. in the mesh that could cause this.
Mesh in shaded mode & in edit mode:

Mesh in shaded mode with flat shading on the object:

Here's a minimal scene showing the problem:



I also have noticed that removing or rotating the sunlight can change the effect though, so it seems to be hard shadows being calculated wrong somehow.
– Aci Jan 16 '23 at 13:26