ORT 1.24.2 release cherry-pick round 2 (#27343)
This cherry-picks the following commits for the release:
- #27323
- #27339
---------
Co-authored-by: Dmitri Smirnov <yuslepukhin@users.noreply.github.com>
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>