IIRC, ArcGIS maintains it’s own python environment (and used to install it over existing installations, ick). So unless you’re using that environment when you launch/run flask, you’re likely not getting the config/resources loaded that are needed to support Arcpy functions. It’s like trying to load a library installed into a different python virtual environment. You can provide the path, but if it requires any additional content or configuration from it’s own venv, it won’t work.