Thank you for the quick feedback. The test script works this way. However, if I implement this in my actual scripts as well, a similar error message appears again:
Error using appwindowfactory
Functionality not supported with figures created with the uifigure function.
The only relevant difference from the test script is that my actual scripts work within a MATLAB App Designer environment. From MATALB App Designer external MATLAB scripts are started, which should create these figures. Does MATALB App Designer affect uifigure and my actual goal of creating a table in a figure?