The difference is most likely based on which version of "Arduino Mbed OS Boards" vs. "Arduino Mbed OS Nano Boards" you are using (e.g., 2.2.0 vs 2.5.2). There have been some breaking changes in the recent releases.
If you open Boards Manager (Tools > Board > Boards Manager), you can see which version of each you have installed.