Cannot upload to STM32 blue pill fake after pio update

Thanks for your answer!
The solution in this post actually fixed the serial usb issue for me: Difficulty with getting USB serial [USB CDC] working

However, when trying to compile while using Serial2 or Serial3, I get the following error:

main.cpp:(.text.setup+0x20): undefined reference to `Serial2'
collect2: error: ld returned 1 exit status
*** [.pio/build/genericSTM32F103C8/firmware.elf] Error 1

Does anyone have an idea why all this is necessary to only get the sub serial port running? Is there a way to fix this or to roll back to the old version which worked seamlessly? I also realized that the IDE does no more recognize that my board only has 3 serial ports and not 10. This is fixed by setting board_build.core = maple, then I can also compile when using Serial2, however the USB Serial does not work even with the solution from the link posted above.