How to resolve EditorSceneManager does not contain a definition for 'IsGameObjectInScene'

Now I know this question has been asked half a thousand times. But before this is marked as a duplicate, I assure you, I’ve tried every solution I’ve come across.

I’m currently in the process of updating a project from Unity version 2017.4.40f1 to 2021.3.22f1, and this is one of the many issues I’ve come across.
I have tried checking the package manager for updates to the Post Processing package, there aren’t any. (I’m currently on version 3.2.2)
I have tried removing and reinstalling this package.
I have tried completely removing the Library folder from the original project to allow it to be rebuilt in the new Unity version.

None of these have solved the problem, and I’m not sure what else I could potentially try.
Any further suggestions would be very welcome.

I’ve also included a screenshot of the errors and warnings I’m getting, in case they mean anything more to anyone else.

Last I remember the post processing went obsolete with release of 2019, or perhaps 2020 it was. I had a project which depended heavily on that post processing at the time, and I lost most of the look of that project when I upgraded to 19 or 20 (can’t specifically remember which). So I stopped using those types of freebies considering it to be something I cannot depend on in my project while upgrading Unity to latest versions (which I once believed to be the right thing to do).

I managed to stabilise my project but it did involve losing the post processing package entirely I believe.