title: Functions missing in production slot after deploying to staging slot
body: <p>I have a function app with 2 slots - staging and production. Both staging and production slots have some functions.</p>
  <p>I have the following YAML task to deploy to staging deployment slot:</p>
  <pre><code>- task: AzureFunctionApp@1
    displayName: 'deploy ${{ parameters.name }} function app (staging)'
    inputs:
      appType: 'functionapp'
      azureSubscription: sub
      appName: 'appname'
      Package: 'name.zip'
      deploymentMethod: 'runFromPackage'
      deployToSlotOrASE: true
      slotName: 'staging'
      resourceGroupName: 'rg' 
  </code></pre>
  <p>After deployment I see functions inside staging slot but I see NO functions (or ONLY one function with the same name as function app) inside production slot. What am I missing?</p>
  <p><a href="https://i.stack.imgur.com/S8Qh3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S8Qh3.png" alt="enter image description here" /></a></p>
  <p>UPDATE:</p>
  <p>I have the following resources in bicep file before the above YAML step:</p>
  <pre><code>resource functionApp 'Microsoft.Web/sites@2018-02-01' = {
    name: name
    location: location
    kind: kind
    properties: {
      serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
      clientAffinityEnabled: false
      httpsOnly: true
      siteConfig: {
        use32BitWorkerProcess : false
        appSettings: secretSettings
      }
    }
    identity: {
      type: 'SystemAssigned'
    }
  }
  
  resource functionAppSlot 'Microsoft.Web/sites/slots@2018-11-01' = {
    name: name
    kind: kind
    location: location
    properties: {
      clientAffinityEnabled: true
      enabled: true
      httpsOnly: true
      serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
      siteConfig: {
        use32BitWorkerProcess : false
        appSettings: secretSettings
      }
    }
    identity: {
      type: 'SystemAssigned'
    }
  }
  </code></pre>
  <p>While creating the function app, does it delete all the existing functions in production slot?</p>