I've done this several times with no issue.
At sea level, atmospheric pressure is ~14 psi. The recommended pressures for OneUp dropper posts (a representative post, IMO) is between 250 psi and 300 psi.
The point is, even if your plane climbed so high as to exit the atmosphere entirely, the relative pressure change just wouldn't be enough for me to worry about.
If you are worried about it. You could air down your post to e.g., 200 psi, and air it back up upon arrival. I do this with my tires. I drop them down to ~14 psi before a flight.