I have created an attribute and setting it programmatically, with varchar but used as a dropdown in admin panel in next screenshot
But every time is just shown the same value.
It’s because dropdown properties can be varchar.
But when you set it up varchar and use dropdown then, it will convert into an int, but the product which already saved this product will not be shown, but new product will be shown.
You can hint from catalog_product_entity_varchar table.