Solution to loose DIP switches on breadboard: perfboard and 2,54mm/0.1in pin header. Put DIP switch legs and pin header into the SAME perfboard holes (from opposite sides, will fit both!). Slide header
5imple Circuits: How to use a DIP switch - YouTube
5 pz Red DIP Switch Piano-Dip 1-10 posizioni 2.54 mm Pitch for Circuit Breadboard PCB : Amazon.it: Fai da te