Out of curiosity, is the pg14 running with the default jit=on setting?
This is obviously entirely due to the nature of the particular queries themselves, but we found that for our workloads that pg versions greater than 11 were exacting a huge cost due to the jit compiler. Once we explicitly turned jit=off we started to see improvements.