What you need to do is replace the original override of typeA back to typeA. Your task t2 just creates another override with replacing the existing one.
typeA:::type_id::set_type_override(typeA::get_type(),1) // Override trans item typeA with typeA
P.S.A.: usefunction void instead of task for non-time consuming subroutines.
It gives a warning “Original and override type arguments are identical:typeA” and when I do factory.print() after this override, it prints the following