So the most recent platform version is 15.6.0 using ArduinoCore-mbed 4.0.2 per releases.
Let’s go for the low hanging fruit first and equalize the used Arduino core version. To do a quick update, open a PlatformIO core CLI and do
pio pkg update -g -p ststm32
and retry uploading the PlatformIO sketch.