So, in the end, the problem was this
system_process E/NotificationService: Indirect notification activity start (trampoline) from com.xyz.debug blocked
On android 12 and above we can't start activities from a service or from a broadcast receiver on a notification tap (which is what I was here doing), I was trying to start an activity from the broadcast receiver, and I was firing that broadcast when the user was tapping on the notification.
When users interact with notifications, some apps respond to
notification taps by launching an app component that eventually starts
the activity that the user finally sees and interacts with. This app
component is known as a notification trampoline.
To improve app performance and UX, apps that target Android 12 or
higher can't start activities from services or broadcast receivers
that are used as notification trampolines. In other words, after the
user taps on a notification, or an action button within the
notification, your app cannot call startActivity() inside of a service
or broadcast receiver.
When your app tries to start an activity from a service or broadcast
receiver that acts as a notification trampoline, the system prevents
the activity from starting, and
Documentation link
How did I solve the problem
simple, I used the same code, i.e. adding a broadcast to the pending intent and attaching that pending intent to the setContentIntent() on the notification for android 11 and lower devices but for android 12 and higher devices I replaced that broadcast to activity intent (an activity with transparent background) and in that activity, I placed the same broadcast code which I used for android 11 and lower devices and then using sendBroadcast() method I fired that intent myself and after that finished that activity.