The input mask does not apply to the ZIP or Postal Code field of the Advanced Address field. If you want to enforce that format for the postal code, you can use a single line text field to capture the postal code, and use your new input mask there. When adding this custom mask with the gform_input_masks filter, the new mask should be a choice in the input mask drop down. Screenshot after I added your code to my site: https://d.pr/i/2eYZ5E