Downgrading pylance worked for me, I downgraded it to "2024.12.1". I suspect this problem is caused by the server version being too old.