Quick answer: AudioServer.set_bus_volume_db() changes the running game only; nothing writes it back to default_bus_layout.tres. Save your volume settings yourself (a ConfigFile in user://) and re-apply them when the game starts, looking buses up by name with AudioServer.get_bus_index().

Players turn the music down, quit, and come back to full volume. The bus layout in the editor is a default, not a save file, so persisting settings is your game's job.

Where bus settings live

The editor's Audio panel edits res://default_bus_layout.tres, loaded at startup (path set by Project Settings > Audio > Buses > Default Bus Layout). Exported games cannot write to res://, and AudioServer never saves on its own. So every change made at runtime is lost when the game closes.

Save and load settings

# settings.gd (autoload)
extends Node

const PATH := "user://settings.cfg"
var config := ConfigFile.new()

func _ready():
    config.load(PATH)          # fine if it does not exist yet
    for bus in ["Master", "Music", "SFX"]:
        set_volume(bus, config.get_value("audio", bus, 1.0), false)

func set_volume(bus: String, linear: float, save := true):
    var idx := AudioServer.get_bus_index(bus)
    AudioServer.set_bus_volume_db(idx, linear_to_db(linear))
    AudioServer.set_bus_mute(idx, linear <= 0.001)
    config.set_value("audio", bus, linear)
    if save:
        config.save(PATH)

Hook your sliders to Settings.set_volume("Music", value) with slider values from 0 to 1.

Use names, not indices

Bus indices change when buses are added or reordered. Always resolve them with AudioServer.get_bus_index("Music"); it returns -1 if the name does not exist, which is worth asserting.

Use linear values for sliders

Volume in decibels is logarithmic. A slider mapped straight to -80..0 dB feels like nothing happens for most of its travel. Store 0..1 and convert with linear_to_db(), as above. Mute at zero, since linear_to_db(0) is negative infinity.

The layout itself resets in the editor

If the editor's bus layout (buses, effects) disappears between sessions, the layout file was not saved or the project setting points elsewhere. In the Audio panel use Save As to write default_bus_layout.tres, and check it is committed to version control.

Apply settings early

Apply saved volumes in an autoload's _ready(), before the first scene plays music. Otherwise the title music starts at full volume and drops a frame later.

Related fixes