Twitter Inc. failed to convince a California federal appellate court that its free-speech rights are being threatened by a Texas attorney general's investigation into the lifetime ban the social media platform imposed on former President Donald Trump.