Hi @Lecus Soh ,
Per my test, I could reproduce your issue on my tenant. This seems to be some changes in SharePoint Online after 12th January. And I find the same issue in this thread: https://sharepoint.stackexchange.com/questions/288764/sharepoint-online-javascript-creates-folder-instead-of-document-set/288820#288820
I find something interesting: the icon of the document set displays normal in modern experience,however it displays folder icon in classic experience.
I find a temporary solution to this issue: use the list.contentTypeID instead of web.ContentTypeID. To get the list contenttype id, go to library settings, click the document set content type. You could find it in the url.
Use this list contentTypeID would fix this:
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.