Can we declare output as "inout" to design a flip flop in VHDL?
Either will work, as you discovered. However, I have run into enough "glitches" with various simulation and synthesis tools when using inout ports that I now avoid them whenever possible. So I would say that the first method is preferable.