Okay. I found the answer.
rnn = nn.LSTM(features_in=10, features_out=20, num_layers=1, batch_first=True)
is similar to lstm = tf.keras.layers.LSTM(features_out=20)
Note:  keras does not provide option for how many LSTM layers you want stack therefore I put 1 for num_layers. In keras you don’t have to provide features_in.
rnn = nn.LSTM(10, 20, 1, batch_first=True)

#  [batch, sequence length, features]
input = torch.randn(5, 3, 10)

h0 = torch.randn(1, 5, 20)
c0 = torch.randn(1, 5, 20)
output, (hn, cn) = rnn(input, (h0, c0))

# output shape: [batch, sequence length, out features]
output.shape


torch.Size([5, 3, 20])

Now, for keras:
# [batch, timesteps, feature]
inputs = tf.random.normal([5, 3, 10])
lstm = tf.keras.layers.LSTM(20, return_sequences=True)
output = lstm(inputs)

# output shape: [batch, sequence length, out features]
output.shape


TensorShape([5, 3, 20])