```
Microsoft's C++ Standard Library uses the [[nodiscard]] attribute for try_lock().
See: https://github.com/microsoft/STL/blob/main/stl/inc/mutex
```
It appears the same issue occurs with GCC 13.1.
Backport of [[https://github.com/bitcoin/bitcoin/pull/26189 | core#26189]].