I had the same issue you describe here. It took me over 10 hours of troubleshooting before finally finding the issue. Since it took me this long to find out, I decided to share it with you.
I upgraded all our SCCM servers from Windows Server 2012 R2 to Windows Server 2022 (via Windows Server 2019). After the upgrade, some of our SCCM admins started to complain that they were no longer able to use a remote SCCM management console to connect to SCCM.
The cause is that as part of the SCCM upgrade WMI permissions for the LOCAL group SMS Admins is deleted. Pooooffff, just gone.
After you upgrade the site server, or an instance of the SMS Provider, you can't connect with the Configuration Manager console. To work around this problem...