Yes so the point with your example itinerary (ATH-LHR-LIS) is that while you won't be entering the UK (as you connect airside) you will both:
- leave Schengen - and have your passport stamped on exit - at ATH
and then
- enter Schengen - and have your passport stamped on entry - at LIS.
So for all intents and purposes it's the same as leaving and coming back again by any other means.