Hey there petmitsu,
I apologize about the late response, thank you for being patient! To answer your question, if you connect headphones via your phone's 3.5mm jack, the sound will still cast to the Chromecast and output through your TV's speakers, and no sound will come from the headphones.
I hope that helps, and if you have any other questions or concerns for me, please let me know!
Due to inactivity, I'll go ahead and lock this thread in 24 hours. Feel free to start a new thread if you need assistance with your Chromecast and we'd be glad to assist you further.