"Could not retrieve the result of the job execution. This might be because a message was too large to process." when robot is finishing a workflow

Using RE-Framework, browser object retrieved by Open browser is passed among xaml files as arguments. When Chrome is closed before the workflow finishes, an exception occur when the workflow finishes. "Could not retrieve the result of the job execution. This might be because a message was too large to process."

In eventlog, there is an exception shown below.
RobotRunner.NotifyJobCompleted error Newtonsoft.Json.JsonSerializationException: Error getting value from ‘Element’ on ‘UiPath.Core.Browser’. —> System.Runtime.InteropServices.COMException: Uninitialized UI node.
at UiPath.UiBrowserClass.get_node()
at UiPath.Core.Browser.get_Element()
at GetElement(Object )
at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
— End of inner exception stack trace —
at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeDictionary(JsonWriter writer, IDictionary values, JsonDictionaryContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at UiPath.Shared.JsonParser.SerializeObject(Object value)
at UiPath.Executor.RobotRunner.NotifyJobCompleted(ActivityInstanceState state, IDictionary`2 output, Exception exception)

Please provide a way to resolve the above exception.

If main.xaml has an output argument which contains the Chrome browser object.

Change the argument to be a variable or change the direction of the argument to be 'in.'