Custom Module: Live preview using type "callback" is not working in multiple instances

Hi Community,

I am relatively new to building custom modules. In my modules, I have fields that are connected to a preview using “callback” type. Here’s my sample code:

“preview” => [
“type” => “callback”,
“callback” => “MyPreviewField”
]

Now my problem is when having multiple instances or multiple modules on a single page the callback is not applying the changes to the correct module.

What am I missing?