Fixes client side aspects of #90065 by preventing the metadata saving be...

...fore the layer's publication, which allows us to retrieve more data about the new layer from the server, which we inject in the form before submitting at the end of the process (but before making the metadata public).