CUSTOM MATERIAL - Cannot add uniform after UBO created

In a previous version of Babylon.js I could assign a custom material to a submaterial but now when I do that i get “Cannot add an uniform after UBO has been created” error. Has anyone encountered this? Is there a workaround? @nasimiasl maybe you are familiar with this

Here is a playground to demonstrate

I’ve noticed that this one does not produce any webGL errors