Hi Fumiya,
MATLAB's cache might still retain information about Stateflow. Restarting MATLAB can clear the cache and resolve the issue in some cases.
Could you check this way?.
See if the following helps, which I used for my other project: https://www.mathworks.com/matlabcentral/answers/872308-how-can-i-identify-and-remove-missing-and-not-needed-dependencies-from-a-simulink-project-in-r201