These are not always deterministic, but there seems to be some race condition in setting/sharing state across workers. For example,
https://builds.apache.org/job/beam_PreCommit_Python_Commit/10174/consoleText
FAIL: test_pardo_state_only (apache_beam.runners.portability.fn_api_runner_test.FnApiRunnerTestWithBundleRepeatAndMultiWorkers)
...
apache_beam.testing.util.BeamAssertException: Failed assert: [('A', 'a', 1), ('A', 'a', 2), ('B', 'b', 1), ('B', 'b', 2), ('B', 'b', 3)] == [('A', 'a', 1), ('B', 'b', 1), ('B', 'b', 2), ('A', 'a', 1), ('B', 'b', 1)] [while running 'assert_that/Match']