Hi
The clarification given by IFAB is that
" When the GK clearly kicks or tries to kick the ball into play, this shows no intention to handle the ball so, if the ‘clearance’ attempt is unsuccessful, the goalkeeper can then handle the ball without committing an offence"...