Encryption vs. decryption of same plaintext Does the same encryption algorithm given the same plaintext always produces the same ciphertext?

Does this cause any security flaws?
It very much depends on the encryption scheme you are using.
In a deterministic encryption scheme, the same plaintext is always encrypted to the same ciphertext (when using the same key of course).
This indeed causes a security problem for all deterministic schemes. I.e. no deterministic scheme can be IND-CPA secure.

If you take a look at the IND-CPA game, you can see why: The adversary $\mathcal{A}$ may simply choose two random messages $m_0,m_1$ and submit them to the challenger. After receiving the ciphertext $c$ he asks for an encryption of $m_0$ and receives ciphertext $c'$. Now as the scheme is deterministic, it follows that $c=c'$ if and only if $c$ is an encryption of $m_0$, therefore if $c=c'$ $\mathcal{A}$ outputs $0$, otherwise $1$.

Therefore, to achieve IND-CPA security we need probabilistic encryption. In a probabilistic encryption scheme, the encryption algorithm uses additional randomness to produce the ciphertext. See for example ElGamal encryption, where the ciphertext consists of two parts, one of which is a random group element. Also all secure modes of operations for block-ciphers introduce randomness in the form of nonces or initialization vectors.

An important thing to note about probabilistic encryption is that, because decryption must be deterministic, and a single plaintext corresponds to a larger number of ciphertexts, the ciphertext will always be longer than the plaintext.