In order to achieve this you’ll need to write an onChange function for your slideshow. In it you need to use the currentIndex of a slideshow that should be equal to a progress bar value. You can also set a targetValue of a progress bar to be the same as the slideshow slides.length - 1, so there is no need to update the progress bar targetValue each time you change a number of slides. In the end you’ll get something similar to this:
export function slideshow1_change(event) {
let index = $w(“#slideshow1”).currentIndex;
$w(“#progressBar1”).targetValue = $w(“#slideshow1”).slides.length - 1;
$w(“#progressBar1”).value = index;
}