Answer
No, that specific 4,000-character limit on a Custom Menu's inline PL/SQL block can't be extended directly. The two practical workarounds are: (1) move the actual logic into a genuine database package instead, and have the Custom Menu's short PL/SQL block simply call into that package's function/procedure, keeping the inline block itself well under the limit — this is the better, more maintainable approach whenever it's feasible; or (2), if creating a full package isn't an option, aggressively trim the inline block itself, removing comments, removing indentation and extra whitespace, and shortening variable/parameter names, to fit under the 4,000-character ceiling.