If someone still has this issue and are using Mac OS 14+, the problem might appear because of the operating system settings itself. Try to check Mac OS System settings > keyboard > Input sources > Use smart quotes and dashes (enabled by default).