I looked for anything about this in an FAA book.
Chapter 3 of the Instrument Procedures Handbook isn't clear to me. In the paragraph below, the bolded sentence seems to hint that an exact match is expected: leg length must be equal what's charted. On the other hand, the italicized sentence suggests there's more flexibility (but without clearly saying that the leg length in an RNAV chart is a maximum, it's okay to fly a leg that's shorter)
When flying published GPS overlay
or standalone procedures with distance specified, the
holding fix is a waypoint in the database and the end of the
outbound leg is determined by the ATD. Instead of using
the end of the outbound leg, some FMS are programmed
to cue the inbound turn so that the inbound leg length
matches the charted outbound leg length.
Normally, the difference is negligible, but in high winds,
this can enlarge the size of the holding pattern. Aircrews
need to understand their aircraft’s FMS holding program to
ensure that the holding entry procedures and leg lengths
match the holding pattern. Some situations may require
pilot intervention in order to stay within protected airspace.