title: Phaser 3.17 doesn't setect collision between tilemap layer and player sprite
body: <p>No collisions between map layer and player sprite. But collisions between world bounds work. What is wrong?</p>
  
  <p>I tried different workarounds that could find online and none of them worked.</p>
  
  <p>Game config</p>
  
  <pre class="lang-js prettyprint-override"><code>const config = {
      type: Phaser.AUTO,
      width: 800,
      height: 600,
      backgroundColor: "#f",
      physics: {
          default: 'arcade',
          arcade: {
              gravity: { y: gameState.gravity },
              debug: true
          }
      },
      scene: {
          preload,
          create,
          update
      }
  };
  </code></pre>
  
  <p>Code in <strong>create()</strong> regarding the tilemap and its layers and the character</p>
  
  <pre class="lang-js prettyprint-override"><code>gameState.map = this.add.tilemap('map');
  gameState.dungeonTileset = gameState.map.addTilesetImage('dungeon', 'dungeonTiles');
  
  gameState.backgroundLayer = gameState.map.createStaticLayer('Background', gameState.dungeonTileset);
  gameState.mapLayer = gameState.map.createStaticLayer('Map', gameState.dungeonTileset);
  gameState.miscLayer = gameState.map.createStaticLayer('Misc', gameState.dungeonTileset);
  
  gameState.mapLayer.setCollisionByExclusion([-1]);
  
  this.physics.world.bounds.width = gameState.mapLayer.width;
  this.physics.world.bounds.height = gameState.mapLayer.height;
  
  gameState.player = this.physics.add.sprite(73, 398, 'player', 0);
  gameState.player.setCollideWorldBounds(true);
  
  this.physics.add.collider(gameState.player, gameState.mapLayer);
  </code></pre>
  
  <p>No warning and no errors are coming up in the console. I don't know what to do anymore.</p>
  
  <p>Thanks in advance!</p>