How can you keep constant power to lights by removing switch but still keeping power to the switch?
Yes a traditional switch just connects 2 wires together.
For lights controlled by a single switch there will be 2 main configurations you will see.
(colors are assuming US conventions)

neutral at the switch. This is marked by a white wire(bundle) that isn't connected to the switch. And 2 wires connected to the switch.
To install a smart switch there pigtail the wires connected to the switch together and add a wire to the neutral bundle. Those will be your live and neutral to power the smart switch.

no neutral at the switch. This is marked by not having a non-ground wire disconnected from the switch. Often the white wire will be marked by a loop of tape.
This is more complicated to adjust. Find the junction box where the switch-loop starts (often the at the light itself) and move the white wire going to the switch to the neutral bundle and the black to the live bundle. Then you can remove the tape loop marking the white as a live both at the junction box and the switch and you now have a live and neutral at the switch.


When multiple switches control the lights, there will be a set of 3 wires running between the switches: 2 travelers and either a neutral or a switched live. The process to convert is similar to above with the addition of an extraneous wire that you can cap off.