Sir Keir Starmer has backed giving judges powers to force offenders to attend sentencing hearings.