I had the same problem and it is all about the order in which you do things. To get it to work, first select screen mirorring on your TV and then connect to your tablet. On my TV (Sony) I press the input button (HDMI etc) and select screen mirroring. Because I have already paired my device, I don't have to do anything else. Then, I go back to watching normal TV. I then grab my tablet, select miracast and connect to the TV. The TV then displays my android device screen and both devices remain connected to the web. However, If you are in the screen mirroring page on your TV and you try to connect via Miracast from your tablet, you will be told that "this device will disconnect from WiFif...." But if you are just watching BBC1 (or whatever), your tablet will connect and your TV will display your tablet without either disconnecting from WiFi. Really strange that this happens but strange things do happen with IT.
... View more