[2409.18860] LW2G: Learning Whether to Grow for Prompt-based Continual Learning