Code suggestion - undefined functions

I’m new to using Cursor for my C project and noticed a shortcoming of AI code suggestions. In Chat suggests code that includes non-existent functions or constants. The suggested names are often close to the actual ones, but I still need to double-check the spelling and the number of arguments. What’s especially annoying is that as soon as I “accept” the suggestion, VS Code immediately flags the code as incorrect because it recognises that the functions either don’t exist or have different signatures. Is this a known issue?