I'm trying to make an autoscrolling background.
I followed this tutorial: How to Make Infinite Backgrounds Godot
The setup is just a ParallaxBackground node with a ParallaxLayer node and a Sprite node. That's it.
and it works like a charm:

Until I add it to any of my scenes. Then, the movement of the background start for a fraction of a second, and it stops:

No idea what the problem is. The parallax effect still works tho. It's just not auto-scrolling.
Here's the code for the movement:
extends Node2D
export(int) var speed: int = 1000
export(float) var rotation_speed: float = 0.3
var direction = Vector2(-1,1)
onready var parallax = $ParallaxBackground
func _process(delta: float) -> void:
parallax.scroll_offset += direction * speed * delta