The transaction API uses CancelableOperationContext so killing the opCtx of the caller of the API will kill any opCtxs spawned to run transaction operations. CancelableOperationContext will kill its opCtx when its source token is canceled always with ErrorCodes::Interrupted. This can lead the API to fail with this generic, non-retryable code in scenarios where it should have been interrupted with a meaningful code, e.g. like InterruptedDueToReplState change on failover, which can lead to problems, e.g. an operation using the API pessimistically skips failover retry logic.
The spawned operations already use the same session as their caller, if they had one, so killSessions for an operation using the API will still work as expected, the only downside should be that killOp of the caller's opCtx won't interrupt the API's transaction, but it will still interrupt the caller's command.