Edit: For those interested, here are the 108 possibilities for $N=9$. I hope there's some way of checking what these are more efficiently than just going through them by hand.
[[2,7,5,3,8,1,6,4,0],[2,7,5,3,1,8,6,4,0],[2,5,7,3,1,8,6,4,0],[2,7,5,1,3,8,6,4,0],[2,5,7,1,3,8,6,4,0],[2,6,8,3,5,1,7,4,0],[2,7,5,3,1,6,8,4,0],[2,5,7,3,1,6,8,4,0],[2,7,5,1,3,6,8,4,0],[2,5,7,1,3,6,8,4,0],[3,8,6,1,4,7,2,5,0],[3,6,8,1,4,7,2,5,0],[3,7,1,4,6,8,2,5,0],[2,8,6,4,1,7,3,5,0],[2,6,8,4,1,7,3,5,0],[2,7,4,1,6,8,3,5,0],[2,4,8,6,3,1,7,5,0],[2,4,6,8,3,1,7,5,0],[3,8,1,6,4,2,7,5,0],[3,1,8,6,4,2,7,5,0],[3,6,1,8,4,2,7,5,0],[3,1,6,8,4,2,7,5,0],[2,8,4,6,1,3,7,5,0],[2,4,8,6,1,3,7,5,0],[2,6,4,8,1,3,7,5,0],[2,4,6,8,1,3,7,5,0],[3,7,1,4,6,2,8,5,0],[2,7,4,1,6,3,8,5,0],[3,8,5,1,7,4,2,6,0],[3,7,5,1,8,4,2,6,0],[3,5,7,1,4,8,2,6,0],[4,7,1,3,5,8,2,6,0],[4,1,7,3,5,8,2,6,0],[4,8,2,5,7,1,3,6,0],[4,7,2,5,8,1,3,6,0],[4,2,7,5,1,8,3,6,0],[2,4,7,1,5,8,3,6,0],[2,8,5,3,7,1,4,6,0],[2,7,5,3,8,1,4,6,0],[3,8,1,5,7,2,4,6,0],[3,7,1,5,8,2,4,6,0],[2,7,5,3,1,8,4,6,0],[2,5,7,3,1,8,4,6,0],[3,1,7,5,2,8,4,6,0],[4,2,7,5,3,1,8,6,0],[3,5,1,7,4,2,8,6,0],[4,2,7,5,1,3,8,6,0],[2,4,7,1,5,3,8,6,0],[3,1,5,7,2,4,8,6,0],[5,8,3,1,6,4,2,7,0],[5,3,8,1,6,4,2,7,0],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