Sometimes current/former politicians are referred to by their most senior held (previous or current) title, rather than strictly their current title.
For example, in a 2016 Presidential debate, Hillary Clinton was referred to as 'secretary', even though her role of secretary of state ceased 3 years' prior in Feb 2013.
Another example is Barack Obama's current medium profile stating 'President'.
When does the convention of referring to a politician by their most senior held title (rather than strictly their current title only) apply? It contrasts somewhat to some other professions like medicine or finance, where referring to oneself by a previous position can be viewed as inaccurate (e.g. as a doctor or financial planner respectively, if one does not currently hold the said position).