MATLAB: Loadlibrary mac os 10.15.4 and Matlab 2020a gives can’t find correct SDK

10.1510.15.42019b2020acatalinaloadlibrarymacosMATLABosxsdk

loadlibrary was working fine until a few days ago, so I wonder if a recent update of OSX has brought about this problem. I experienced it with Matlab2019b, so switched to Matlab2020a, but the problem persists.
loadlibrary gives the following output:
Error using loadlibrary
Failed to preprocess the input file.
Output from preprocessor is:xcodebuild: error: SDK "macosx10.15.4" cannot be located.
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx10.15.4 -find clang 2> /dev/null' failed with exit code 16384: (null) (errno=Nosuch file or directory)
xcrun: error: unable to find utility "clang", not a developer tool or in PATH
Running the following directly from the command line gives a similar result:
> /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx10.15.4
xcodebuild: error: SDK "macosx10.15.4" cannot be located.
But the following is fine:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx10.15
How can I tell Matlab to look for 10.15 instead of 10.15.4?
Related Question