From the ImageMagick docs:
Use -define trim:edges={north,east,south,west} separated by commas to only trim the specified edges of the image
So you can trim only the bottom border with
magick pre-trim.png -define trim:edges=south -trim post-trim.png