Power BI Web API Dataset refresh
Allow Power BI Web datasets that use APIs and API keys to be able to be refreshed properly. Currently if you run an API to get a dataset then you will run into an issue where tying to update the credentials in "Data source credentials" will not work properly.
Try clearing your cache.
It seems that the issue is from multiple API call.
Into desktop, the credentials are identified only to the token api, when publishing to Power BI Service, Power BI take full connection string in consideration
For example :
Are considered same connection into Desktop, different into Service
Challice Genest commented
Note: API authentication is called through web, and the API key is often passed as a header value and thus changing the credentials would mean going back to the "Web call edit page" instead of the typical "Edit credential" modal...I'm not sure how this should be resolved but it should be taken into account