Samsung S9 and screen mirror problem

Have used my S6 and S7 with my miracast with no problems. Updated to an S9 and when I start to screen mirror I get problems.
If I get zwift up and running (this is my normal way with S6+S7) once I start to mirror, Zwift shuts down , then when I resrart Zwift it just sits on the log on screen.
If I start the screen mirror first Zwift sits on the log on screen again , once in a while it will log on but takes ages.
Has anyone else had this ? Probably a problem with wifi settings somewhere as the mirror cast and Zwift are on the same network.