When you edited the file show of the view product, you extracted the div hikashop_small_image_div from the div hikashop_product_image_main
When you change a characteristic value, the content of the div hikashop_product_image_<ids_of_values> is copied to the div hikashop_product_image_main.
In your div hikashop_product_image_<ids_of_values>, you still have the small_image div corresponding to the main image of that variant. So when the copy occurs, you get the small images appearing below the main image.
That copy process is used so that you can display different images for different variants.
What you should do is to change the code:
if(!empty($variant->images)){
to:
if(false){
in the file show of the view product so that the variants images HTML code is not generated at all and that no images copy will occur when changing the values of characteristics, since apparently you don't want to set different images for different variants.