And when that developer copies and pastes useful code snippets from the internet into this product you’ve commissioned them to create? Also not copyrightable?
If you allowed that in your contract when doing the commissioning that's on you.
I wouldn't be surprised that if you asked an AI to weite said contract it would add a clause regarding copyright ownership of all codr and will put the onus on the developer to prove ownership of all of it.
Effectively you could sue them if you ever get sued.
When it comes to copyright and licensing it's complicated and it's best to write the code by hand.