There seems to be an issue with export of inlinetasks, at least with customizing it. Org mode version 9.5 (9.5-gced2b3
Please see the POC below:

* heading 1
** heading 1.1
* heading 2
*************** TODO inline task
*************** END
* heading 3
** heading 3.1
* Direct is fine
#+begin_src elisp
(let ((parsetree (org-element-parse-buffer)))
  (org-element-map parsetree '(headline inlinetask)
    (lambda (e) (org-element-property :title e))))
#+end_src

#+RESULTS:
| heading 1          |
| heading 1.1        |
| heading 2          |
| inline task        |
| heading 3          |
| heading 3.1        |
| Direct is fine     |
| Issue is at export |
* Issue is at export
#+begin_src elisp
(let ((mist-output "")
      (org-export-with-inlinetasks t))
  (defun mist--html-format-inlinetask-function (todo todo-type priority text tags contents info)
    (setq mist-output (format "%s\niii %s" mist-output text))
    "iii")
  (setq org-html-format-inlinetask-function 'mist--html-format-inlinetask-function)
 
  (defun mist-html-format-headline-function (todo todo-type priority text tags info)
    (setq mist-output (format "%s\nhhh %s" mist-output text))
    "hhh")
  (setq org-html-format-headline-function 'mist-html-format-headline-function)
  (kill-buffer (org-export-to-buffer 'html "mist.html"))
  mist-output)
#+end_src

#+RESULTS:
#+begin_example

hhh heading 1.1
hhh heading 1
hhh inline task
hhh END
hhh heading 2
hhh heading 3.1
hhh heading 3
hhh heading 4
hhh Direct is fine
hhh Issue is at export
#+end_example