Carbon API is not really used (except for HIRanges... or so... but these are graphics)
the reason on why a dialog won't open is probably due to this error:
2019-08-14 20:30:48.516 project1[2053:31333] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
(the error is produced, even if the following code is used:
NSOpenPanel.openPanel.runModal;
which is a minimal ObjC to run a file dialog)
Whatever "carbon" reference is used within Apple frameworks, is out of LCL control