Hi Brent, at one time, and to some extent, BBDuk did trimming of sam/bam files. However, it's a very fiddly process because the cigar strings and MDTags have to be regenerated, and some other tags may end up becoming incorrect as a result of the trimming operation, so I don't really recommend it (although for ubam it wouldn't matter). Generically, one can put metadata in a fastq header and then move it back to a bam field later.
What's happening here is that BBDuk is trimming the read successfully, but then outputting the original untrimmed SamLine anyway instead of regenerating it (if you output as fastq you'll see that the reads actually got trimmed in that case), which is a bug. This is easy to fix in the case of ubam, and I will fix it in my next release. Whether the change will work universally for mapped bam is less likely; I'll probably prevent that.