Signal remains constant when implementing FSK
The sampling rate you're using is too low. The cosine signals have frequencies 4,000 and 6,000 Hz, but your sampling frequency is 1000.

An FSK signal has a very large bandwidth -- in theory, it is infinite. This is because of the sharp transistions between pulses of different frequencies. My suggestion is to use a sampling frequency that is around 5 to 10 times larger than your carrier, or around 25,000 to 50,000 samples per second in your case.