If your partner is not committing, they probably have a different motive. You can try asking them, but you’ll likely have to figure out their motives based on their actions.
One common motive among the "non-committers" is using you for financial gain. Another motive is to use you for relationship privileges, such as intimacy and companionship.
Communication is key when it comes to relationships. The next time the person performs romantic actions but refuses to make the relationship official, address it head-on.
Use "I" sentences instead of "you" to avoid sounding accusatory when confronting them. Make sure you tell them how their actions make you feel, and include your expectations.
Setting boundaries is a form of much-needed self-care. They can be physical, like saying no to plans with them, or mental, such as not giving them control over your thoughts.
If you want your relationship with them to change, communicate these boundaries and your reasons for them. They will change their ways if they genuinely want to commit to you.