Should awaitTermination wait for Activity completion?

I am using this code to shutdown worker:

workerFactory.shutdown();
workerFactory.awaitTermination(terminationTimeout, TimeUnit.SECONDS);

Based on documentation:

Activities are allowed to complete during the graceful shutdown period.

And some comment on this forum, like this

Proper termination of a worker deployed on Kubernetes? - Community Support - Temporal Community Forum

I have an impression that if there is a running Activity, worker will wait for terminationTimeout before killing it.

Instead, I am getting this message:

Wait for a graceful shutdown of SyncActivityWorker{}#heartbeatExecutor timed out, fallback to shutdownNow()

And worker shutdown immediately.

Is it expected behavior? If yes, is there any other way to get Activity some time to complete?

This is related to issue here and having a longer HeartbeatTimeout set on activity.
See if you can reproduce with HeartbeatTimeout set to less than 5s. SDK in this case (5s or less heartbeat timeout) should be able to flush scheduled heartbeat. Report if you still see issue with shorter timeout.