Pages will then attempt to find the closest 404 page. If one is not found in the same directory as the route you are currently requesting, it will continue to look up the directory tree for a matching 404.html file, ending in /404.html.
example.com/de/foobar, it should use the 404.html under the /de/ directory. However, it looks like the 404.html at the root is always used.