When using Connect-PnPOnline with a credential being passed, it does not match a stored credential if the stored credential has a trailing slash and the URL passed to -Url does not.
The stored credential would be used whether it was created with a trailing slash or not.
The stored credential is not used.
Create a stored credential where the -Name has a trailing slash, like https://M365x541279.sharepoint.com/. It does not get used when connecting to that same URL without the trailing slash, like https://M365x541279.sharepoint.com.

(you can retrieve this by executing Get-Module -Name sharepointpnppowershell* -ListAvailable)
3.25.2009.1
I created a Pull Request at https://github.com/pnp/PnP-PowerShell/pull/2925 that just removes the '/' at the end when storing the url in credentials manager (by the way it's one of the best commands ever 馃槃 )
I created a Pull Request at #2925 that just removes the '/' at the end when storing the url in credentials manager (by the way it's one of the best commands ever 馃槃 )
We should still fix Connect-PnPonline, in case the credential was created with something else.