Bug folder name

I noticed that there is a bug when I want to get the folder name, with getfolder ().
While on Photoshop 2022 (win and mac) I get the name,
on photoshop 2021 22.5.7 (only win on mac I have no problems) I get the path of the folder.
i am using manifest 5 and api 2
below an example
photoshop 23.3.0:
photoshop 22.5.7: