Credentials are not stored in the model, they are set in the PBI Service.
See
https://www.data4v.com/automated-updation-of-power-bi-data-source-credentials/
https://learn.microsoft.com/en-us/power-bi/developer/embedded/configure-credentials?tabs=sdk3