Germany is losing popularity with foreign investors