Just checked with latest HEAD on STM32L0538-Disco: Works as expected. The problem in your case might be there:
On 2021-06-17 14:51, ali tekin wrote:
Warn : target was in unknown state when halt was requested
I'd suggest to do a mass erase, reset option bytes to factory defaults, power cycle, then try again.