Seems like a bug in macOS 10.5.
Why don't you use system.applications.fromIdentifier(bundleId)
.
It provides information about running processes with a given application identifier (bundle ID). For example, com.apple.TextEdit.
Parameters
bundleID: A string with the bundle ID of the desired application.
Return Value
An array of dictionaries (associative arrays) describing the
running applications identified by bundleID.
Availability
Available in Mac OS X v10.4 and later.