Adding another  rak’ah to the imam’s witr because one wants to pray some more
Question

Some people, when they pray witr with the imam and he says salam, they get up and do another rakah, because they want to do more prayers before praying witr later in the night. What is the ruling on this action? Is it considered to be forsaking the prayer with the imam?
Praise be to Allah.We do not see anything wrong with this, and the ulama stated that there is nothing wrong with doing this, so that his witr will be at the end of the night. He will be considered to have prayed with the imam until he finished, because he stayed with him until he finished, and added another rakah for a shar'i reason, which was so that he could pray witr later in the night. There is nothing wrong with this, and it does not mean that he did not stay with the imam until he finished, but he did not finish with him he delayed it a little longer.