In Protocol V5+, PREPARE messages include an [int] flags field. This currently is not being accounted for in Prepare.encodedSize so we are inappropriately requesting too small of a buffer capacity, which the warning added in warns us about:
[cluster1-nio-worker-2] WARN com.datastax.driver.core.Message - Detected buffer resizing while encoding PREPARE message (2240 => 4096), this is a driver bug (ultimately it does not affect the query, but leads to a small inefficiency)