The Prophet ﷺ forbade continuous fasting and cupping for the fasting person only out of concern for his companions, not because he made them unlawful.
حدثنا وكيع حدثنا سفيان عن عبد الرحمن بن عابس عن عبد الرحمن بن أبي ليلى
إنما نهى النبي ﷺ عن الوصال في الصيام والحجامة للصائم إبقاء على أصحابه ولم يحرمها
Its chain of transmission is sahih, it has already appeared at 11856 and 12794.