It is entirely possible that messages with differing group id's will exist in a single batch.
There are three rules governing the order of messages leaving a FIFO queue, to help understand the processing behavior:
Return the oldest message where no other message with the same MessageGroupId is in flight.
Return as many messages with the same MessageGroupId as possible.
If a message batch is still not full, go back to the first rule. As a result, it’s possible for a single batch to contain messages from multiple MessageGroupIds.
See https://aws.amazon.com/blogs/compute/new-for-aws-lambda-sqs-fifo-as-an-event-source/ for more information.