Why is this JavaScript prototype inheritance returning undefined? [duplicate]

I’ve been racking my brain over this and can’t figure out why the first console.log is returning undefined but the second one works fine. Any help would be much appreciated it’s driving me crazy.

function Employee(title) {
    this.title = title;
}
Employee.prototype.setTitle = (title) => this.title = title;
Employee.prototype.getTitle = () => this.title;

function Engineer(title, isManager) {
    Employee.call(this, title);
    this.isManager = isManager;
}
Object.setPrototypeOf(Engineer.prototype, Employee.prototype);

Engineer.prototype.setIsManager = (isManager) => {
    this.isManager = isManager;
};
Engineer.prototype.getIsManager = () => this.isManager;

function main() {
    const engineerObject = new Engineer('Developer', false);
    
    console.log(`Initial Employee Profile - Title is ${engineerObject.getTitle()}.`)
    // ---> why is engineerObject.getTitle() returning undefined here?

    engineerObject.setTitle('Manager');
    engineerObject.setIsManager(true);
    
    console.log(`Final Employee Profile - Title is ${engineerObject.getTitle()}. ${engineerObject.getIsManager() ? 'Is' : 'Is not'} a Managern`)
    // ---> works fine here though for some reason
}

main();