Edit Arduino library file installed using library manager

See a related note: How to amend a file in a library - #2 by jcw

If that can’t be used, I’d create a copy of the library in your lib/ dir, which should cause PIO to find that one instead of downloading it. Then you can change that copy.