I agree - it appears you are effectively using microphones as an electric guitar pickup.
The reason is likely because the coils can be moved by the acoustic vibrations from the amplified speakers, in addition to having induced currents due to the moving strings.
You really only want the latter induced string contributions for an electric guitar.
A couple of ideas for you ...
-> You might try to use glue to "fix" the coil spindles from being able to freely vibrate in the air, then you will stop the acoustic part which is causing the feedback.
(use a water-based glue or else you might dissolve the enamel insulation around the fine coil wire)
-> Take a look here (
https://www.instructables.com/id/cheap-and-easy-guitar-pickups/) in case these DIY articles might give you more ideas.
-> Get to know the tech at a local guitar shop - he might have some old pickups lying around from someone who upgraded to aftermarket pickups, maybe for free or bargain.
Note that the design of those speakers also might not be very efficient for picking up induced current due to a nearby moving wire.
(e.g. the magnetic field is not very concentrated directly above the coil, and speakers usually have a low impedance and thus low gain compared to pickup coils which have lots of fine windings)
This could be further aggravating the acoustic component if you are having to increase the gain on your amp to compensate for this.
Internet searching for "guitar pickup design" will provide some helpful background info on such principles.
(e.g.
https://www.guitarnuts.com/wiring/pickups.php and
https://www.guitartechcraig.com/techpckp/pickups.htm )
You can have a lot of fun tweaking your approach, and maybe you could write your own Instructables article afterwards.
I'm mainly trying to help out with some background so you can keep track of cause versus effect.