There are some sentences where it doesn't work.

Москва - столица России.

not Москва - столица в России.