Simulating violation of causality using a topological phase transition