Currently it works the way it does because a top-level val becomes a member of a class with the name derived from the file name, and an object gets compiled into a class with the name derived from the package and the name of the object itself. So the two properties become fields in two different classes, and the two objects become two classes with the same qualified name.
This may change in the future, though; there’s an issue for this problem.