When I select multiple photos and edit the caption, not all captions are updated reliably (and the caption field shows < Mixed >), especially if I select more than 2-3 photos. Only after entering the caption a second time are all photos updated.
I've just tried that several times, using 20-30 images each time, using both Lightroiom versions (Lightroom and Lightroom Classic), but it works correctly each time. You could maybe try resetting Preferences, as that often fixes issues such as this, see this post for details on how to do that: https://www.lightroomqueen.com/how-do-i-reset-lightrooms-preferences/
However, if that fails to resolve the problem, and you can reliably reproduce it, I suggest you report the issue at the official Adobe feedback site:
Thanks, I'll try resetting, and report the issue if that doesn't help... One additional detail: I think this only happens when editing non-consecutive photos. Also, I'm using Windows, so could be a platform-specific issue, too.