I'll and another example and generalize:)
It is a 'regressive assimilation'.
voised consonants (б, з, ж, д, г....)become unvoised before other unvoiced consonant...
водка /votka/
везти /vesti/
....and at the final position:
рог /rok/.
We can't even pronounce a word, ending with a voiced consonant. It took years for me to learn how to say English word 'word' not as 'wort' (or 'worda') but as 'word':)
****
As to voiced consonants 'at the beginning of the next word'...
I can pronounce Oksana's phrases both ways.
Most likely I'd say "лекарство в гла/с/ закапал".
It much depends on speed, intonation, the phrase and syntaxic role of the next word... Sometimes it sounds better when you glue words together, sometimes some border between words is natural....
But when the word is a preposition:
под столом /потстолом/
под окном /подокном/,
под деревом /поддеревом/
Из Саратова. /иссаратова/
Из Москвы /измасквы/
Из Алжира /изалжира/
it gets 'glued'.