I recommend changing it before the trip, and do it a week or two before. That way, if there's leakage or anything due to drain plug/ filter not tight, you will have time to correct it. (That happens, sometimes the tech is just rushing and not double checking everything)
You can change it after, that's for sure. But you will probably get that "maintenance required" message at some point during your trip, which is fine, but just annoys you that you need to get it done.
As a tech who goes on a lot of long trips, I change mine at 5000 miles interval for both my vehicles. If I am approaching the 5k mark before I go on long trip, I'll do it if there's time and lift space at the shop. If not, I do it after I come back. I know the oil change schedule from factory is 10k miles (or whatever the computer says), so I have 5k miles of leeway if I can't get it done before the trip. If my trip is going to be over 5k miles and there's no lift space... I'll do it on the ground.
And that's coming from someone who hates working under vehicles on the ground.