Solved by ariG23498 in post #6 
              
              
                Hey @utsavdutta98 
I can confirm that the way the CustomModel is created makes all the difference. 
I made this GIST to help you find the difference. 
It is a wise choice to not create an object through functional arguments. 
I did a quick python snippet to investigate the issue: 
class A:
    def _…