New Stream Deck version broke my AppleScript

A few months ago, someone on this forum pointed me to this macro for selecting a Stream Deck profile from the menu bar. The new 6.4.1 version of SD changed its menu structure, so the profile names have moved one level further down.

How do I modify the AppleScript to account for this? Thanks!

Old version menu:

New version menu:

SD Profile- LR-Home.kmmacros (9.4 KB)