Hi, Shinde
Reviewing the Assign Built-in User Managed Identity to Virtual Machine policies, it has:
So you should be able to just target the virtual machines directly, independent of the publisher.
https://www.azadvertizer.net/azpolicyadvertizer/d367bd60-64ca-4364-98ea-276775bddd94.html
You could try changing ImageReference to:
{
"field": "Microsoft.Compute/imageOffer",
"equals": "*"
},
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Compute/virtualMachines"
}