Buses from the parks to the resorts run until the very last guest has left the park, including after-hours separate ticket events.
If you're the last one in the park, the last bus will wait until you reach the bus loading area or head off in another direction.