As the title suggests, the chat command for polymorphing does work weirdly with extended spellslots. As you see in the image below I have just rested and used the chat command. It first depleted the level 4 spellslot, but then after maybe a few milliseconds it also depleted the level 5 spellslot.
(https://i.imgur.com/90Wekrz.jpg)
If more tests are required, simply let me know.