Hi,
The latest MATLAB 2022b release addresses issues which are similar to this. Thus, I would suggest you to update your MATLAB and see if that fixes the issue. In case the issue persists, please feel free to reach out MathWorks Technical Support.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!