Mandatory army service in the middle of PhD, will it be possible to finish PhD under these conditions?
This is likely to depend strongly on the country, but in many country's militaries, technical expertise is highly valued.  I have known a number of people in the US, for example, whose official duty assignment was a Ph.D. program.  I do not know whether this is possible in Israel, but suspect your professors may know, and may be able to advise you.

I would thus advise you to investigate whether it is a possible to proactively reach out to the military people who you will need to deal with, and see if you can opt into a program or line of duty that might support this for you as well: it may require making a longer-term commitment to the military, but if it gets you the career you want, the tradeoff may be worth it for you.