Entry UrI Format and ternary operators
I don't think the ternary operator does what you want it to do. According to this page, the first part of your URL format would return 1 (true) if the parent uri is not __home__, or an empty string if it is.

You could try:

{ parent.uri != '__home__' ? parent.uri }/{slug}