I tried to override block with phtml file from
vendor\magento\module-checkout\view\frontend\success.phtml
to my file
app\code\Custom\Module\view\frontend\checkout\success.phtml
and xml file is checkout_onepage_success.xml
<referenceBlock name="checkout.success">
<action method="setTemplate" ifconfig="custom_general/general/active">
<argument name="template" xsi:type="string">Custom_Module::checkout/success.phtml</argument>
</action>
</referenceBlock>
When i have enable module from configuration then execute with my block and phtml file.
when disable module then execute the default file and block.
But default file and block not execute when i have disable module from configuration.
Please help me and solve this issue
Thanks in advance.