Also since the variables at line 38 and 39 are of type uint8_t, the maximum buffer length is 255… or maybe 254 if there’s some problems with overflow and “+1” checks.
You’d have to do a patch to the Arduino framework to get what you want.
But have you already verified your applicaiton still works with the buffer length changed directly in the source file?
I suffered from this affliction as well, but on the ESP32. Here is a clean solution which is not subject to being overwritten by an update of the Wire.h library. In platformio.ini: