Faced the same issue each time I’m restarting the Macbook pro M1, and a random Reddit thread provided me with a way to fix it. Open a terminal and run,
sudo codesign --force --deep --sign - /Applications/Eclipse.app
Not sure why this codesigning fixes the problem. But seems to be a bug in the eclipse itself. Hope this helps someone.