why trainable parameters are not considered right?
In your code by default training=False, set training=True it will work right.
Also, since you are already subclassing keras.Model you don't need to again call keras.Model. Remove the model() method, pass the input directly to call() method by setting training=True.