Depends_on with for_each not working as expected

A similar question was recently asked: Removing OCI security list and updating associated subnet

However I don’t really understand the answer given there - I had it on my list of things to investigate later.