Merge pull request #29064 from rohitwaghchaure/optimize-patch-for-update-bom-in-so-mr

fix: optimize patch for update bom in SO and MR