The project in question does not use analytics, let alone legacy analytics. That means no analytics packages are installed.
The project was just upgraded from Unity 2021 to 2022 and the legacy analytics flag (m_Enabled) keeps getting enabled (see GitHub screenshot) whenever project settings are updated.
First time this happened I even received an e-mail from Unity saying they had detected legacy Unity analytics being enabled and that it’s now retired!
I’ve updated three different projects now (to 2022.LTS) and every single one of them is displaying this behaviour.
Both the Analytics & Legacy Analytics packages are uninstalled and\or disabled. Yet every time I open the project, the flag is set to 1 (i.e., enabled) and I have to undo the change in GitHub.