Code Inspection Does Not Refresh on Edit

When I'm making code modifications, even though I follow the guidance provided by the inspections, the guidance underline does not disappear. It seems like this issue has been happening since the 2023.1 version. Is there any way I can solve this issue?

For your reference, I have tried clearing all PyCharm cache and doing a clean reinstall on m1 mac. I'm currently using PyCharm version 2023.1.2.

I just found out that this issue occurs when the code is very long (over 1500 lines). When I erased all the code in the same file and tested it by modifying it to a simple method, the inspection worked well.