So, I just tossed together a one-action Automator application and saved it to the Desktop as Foobar-2.10.app. The System Information : Applications listing immediately showed the name as Foobar-2.
This does not explain why Gimp-2.10.4 does not register at all, and I believe this to be an issue with Gimp rather than with Apple, as it would at minimum register as Gimp-2.
My names list spans multiple major operating system releases and there is no combination of '-', or '_' used with periods in any of the names. The lone exception is Apple's iMovie 9.0.
You can file a bug report if you want (e.g. bugreporter.apple.com), but rather than that, I would suggest communicating this to the Gimp development team.