I have a polygon layer and I want to dissolve the polygons according to a specific field. I would like to dissolve only the neighbors polygons. For example, look at the below image.
I would like the marked polygons with a red pen to be different features.
Is there any possible way? I use QGIS but any answer in ArcGIS is acceptable.