Lionel Messi scored a goal that trimmed Inter Miami's deficit against Philadelphia Union to 3-2.