fix: honor mouse capture config in terminal attach (#2995)