This is my guess, based purely on speculation,..
I think you've got a fatter chain if it will fit an 8-speed.
When you're in the middle gears, the chain line is straighter towards the chain ring, so the extra gap in the chain can catch an adjacent sprocket.
First and 10th pull the chain sideways, so it stays on the sprocket.
You also have an E-MTB chain that is made in Portugal.
Perhaps the chain only works properly in the mountains of Portugal? Sort of a proprietary thing maybe?
View attachment 171391