It happens on my Note 3 using Plex to play video as well (locally). If I keep the phone awake (plug it in), it doesn't disconnect. If the phone screen turns off and it locks, video keeps playing until the current video is finished and the phone shows it is no longer connected to Chromecast. I can reconnect Chromecast while it is playing though to pause or stop what I am watching. In my wifi settings, the setting for keeping wifi on while the phone is asleep is enabled.
I also have the power save mode disabled.