To reproduce, create a test file as follows:

* A
  link to [[*B][B]]
* B

Put cursor on heading A
C-c C-e (org-export-dispatch)
C-s so Export scope is set to Subtree
t (export to plain text)
A (as ascii buffer)

I see error
user-error: Unable to resolve link: "*B"

Emacs  : GNU Emacs 28.0.50 (build 28, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-07-12
Package: Org mode version 9.4.6 (9.4.6-10-gee652a-elpaplus @ /home/kun/.emacs.d/elpa/org-plus-contrib-20210712/)