this issue fixed itself and has not reoccurred. I might have had the libraries or board set up incorrectly. It now works fine in Arduino IDE & VSCode + PlatformIO