Today, the lakehouses linked to the notebook and the default lakehouse are stored in comments in a .py file, with all the notebook code.
This makes the source control very difficult. If we would like to promote the notebook from development to test and to production and during this promotion we need to change the linked workspaces, it becomes very manual, or in need of devOps processing outside power bi.
If this configuration were located in a configuration file together the notebook (and there are already some json files created for each notebook), we could use gitignore to avoid the json configuration file to be published to the source control. In this way, the notebook could be promoted between environments and it would be linked to different lakehouses on each environment.
It doesn't seem to be able to convert notebook format to .json format. However, you can try to create three project branches for it, Dev,Prod,Master.It also manages the code and provides environment testing as well.