The bug
Read-only scoreboard objectives are only initialized when the value they are tracking changes. Expected would be that they initialize on creation.
Affected objective criteria
air
armor
food
health
level
xp
How to reproduce
Create a scoreboard objective of the type
xp
/scoreboard objectives add xp xp
Check if a value is set by displaying the objective on the sidebar or trying to get the score
/scoreboard objectives setdisplay sidebar xp
/scoreboard players get @s xp
→ ❌ No value is set
Update your xp points
/xp add @s 1
Repeat step 2
→ ✔ Now a value is set
Pretty sure there was already a report about that but I can't find it right now.