Why theme settings lost when I installed https

It seems no connection technically but you might break the serialized data in the database.
Can you please try again with the Better Search Replace plugin https://wordpress.org/plugins/better-search-replace/ and see if it still breaks?
If it’s not then you are breaking the serialize data.