Fix more improper uses of the `buffer_id` field of `Anchor` (#36636)

Follow-up to #36524 

Release Notes:

- N/A
1dd237139cCole Miller committed on 8/21/2025, 1:24:34 PM· committed by GitHubparentf63d8e4
6 files changedLine totals unavailable