Submitted a bug report for this, but posting here as well as instructed.
Device is Blackberry Priv, Android 6.0.1, there's nothing but stock for this device. Poweramp is v3, build 845, as noted.
Issue is that either Android or the Poweramp lockscreens will result in the audio being routed to the handset speaker from the device connected to the headphone jack once either the Poweramp screen is dismissed, or the Android lockscreen displaying the Poweramp notification. I normally use the swipe type of lockscreen, but have reproduced the issue using pattern unlock as well. Tried varying lockscreen settings, as well as audio focus settings, and notification settings. Unsure of what else to try at this point. It's a minor nuisance with headphones as it only plays over the speaker for 1-2 seconds, but when I have my phone connected to my vehicle's auxiliary input, it remains stuck on the speaker until I physically unplug the cable from my phone, and plug it back in again. This is obviously not possible while driving, so this is a somewhat serious issue for me.
I suspect it has something to do with the enforced Android lockscreen setting, I recall in older Poweramp versions, you could fully disable the Android one. I don't use any of the features that are listed as being broken by not having it, and I suspect none of those features work on my version of Android anyway, so I may attempt downgrading to an older build that still has that option and seeing if the issue is resolved. I'll update here with results if I end up going ahead with that for anyone else who may have run into this odd bug, unless it is otherwise resolved before then. I have a plethora of Android devices, and this is the first time I've had this issue.