Hey @utsavdutta98
I can confirm that the way the CustomModel is created makes all the difference.
I made this GIST 1 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 __init__(self):
        pass

class B:
    def __init__(self, a=A()):
        self.a = a

###############################
obj1 = B()
obj1.a

<__main__.A at 0x7f315079e910>


obj2 = B()
obj2.a
<__main__.A at 0x7f315079e910>

They are the same object. Hope this helps!